Borrar filtros
Borrar filtros

plot to a particular axes

4 visualizaciones (últimos 30 días)
Rebecca
Rebecca el 22 de Jul. de 2013
So I have a user interface where the user inputs some values with sliders and text boxes, then it computes some stuff and plots a figure. This consists of 2 subplots, each with 2 sets of data held on.
my problem is that the plot is the full size of the GUI, and not constrained to the axes (called axes5) as I want. How can I do this using subplot? - I've only seen examples using plot and the axes handle??
something likle this:
subplot(2,1,1);
hold on
plot(x,ar0,'-k','LineWidth',2);
plot(x,areas(end,:),'-r','LineWidth',2);
subplot(2,1,2);
hold on
[h0,z,f,D,h_alt] = VokalTraktM(ar0,lv*ones(length(ar0),1),50,5000);
[h1,z,f,D,h_alt] = VokalTraktM(areas(end,:),lv*ones(length(ar0),1),50,5000);
  1 comentario
dpb
dpb el 22 de Jul. de 2013
I've never done GUIs so this is a guess...
From subplot doc's
subplot(..., PROP1, VALUE1, PROP2, VALUE2, ...) sets the specified property-value pairs on the subplot axes. To add the subplot to a specific figure pass the figure handle as the value for the 'Parent' property
Or, if that doesn't bring joy you can always use the form to place the axes precisely where you want them and at a given size...
subplot('position',[left bottom width height]) creates an axes at the specified position in normalized coordinates (in in the range from 0.0 to 1.0)
The latter would be handiest to use if you were to encapsulate it in a helper function, probably.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by