Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Problem with Nexplot and replacechildren for axes

Subject: Problem with Nexplot and replacechildren for axes

From: Camille Couzi

Date: 26 Aug, 2010 20:16:11

Message: 1 of 1

Hi,
I am having a little problem with the nexplot property:

I am working on a GUI that have a axes and a uibuttongroup with 5 buttons. each button corresponds with a matriz, that are all the same size, but with different values inside.
I have created a SelectionChangeFcn for the uibuttongroup, so that each time I click on one button, it displays the matrix with an imagesc on the axes.

The thing is that I would like to keep zoom limits made on a first matrix, and then if I want to see another matrix data on the same axes, that matlab keep these limits.
I don' know how to do that, perhaps with nextplot and replacechildren? I t doesn't work ok because apparently this "replacechildren" set off all the properties of my axes, and so it changes the axis mode, and I can't see my matrix properly.
This what I have:
my axes:
h.cp1=subplot(5,3,[1 2 4 5],'Parent',h.panel_contourplots);
set(h.cp1,'position',[0.08 0.7 0.5 0.25],'nextplot','replacechildren' );

my plot command:
imagesc(matriz);

I have set some Xtick and Yticklabels,...

If you have an idea of what it is happening that would be very helpfgul. thanks!
Camille.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us