Re: Save



Gerald Dalley wrote:


Anthony wrote:


Hi..

I have this problem:

I make a subplot that contains a lot of information and at the
end
I
need to plot a line for each plot.

After that, the user can select to change the position of the
line
with some values taken from a listbox.

For the momment, I have to plot everything again when the user
changes the position line... so It takes a lot of time..

my question is: is it possible to save all the info of one
subplot
and then just replot it when I need it, just adding the new
line?

Thank you very much in advanced!

Anthony

It's not completely clear to me what you're asking, but I think the
following will help you...

When you create your plots, save the handles to them, e.g. the
first
time you plot a line, do something like:
h(mylinenum) = plot(x, y);
Then, when the user updates the x and y values,
set(h, 'XData',x, 'YData',y);
If it's in a loop or something like that, you might need a call to
drawnow as well.

Quick correction:
set(h(mylinenum), 'XData',x, 'YData',y);
where I'm assuming you're keeping track of multiple lines and
mylinenum is a variable indicating which plot line you want to
create/modify.

Consider reading the matlab doc section on handle graphics:

<http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f7-20419.html>
.



Relevant Pages

  • Re: Changing methods of writing
    ... I think how it works is that it starts with me having necessary plot ... have to think a bit more and instead add a scene developing point B ... instead of skimming over lots of shallow subplots. ... subplot, but I don't think that's what you mean by linking subplots. ...
    (rec.arts.sf.composition)
  • Re: Changing methods of writing
    ... I think how it works is that it starts with me having necessary plot ... points A, B, C, and D. Then if I add a scene introducing subplot E, ... surplusapprentice carpenter (or maybe Jim has a crush on her - ... after Besara). ...
    (rec.arts.sf.composition)
  • Re: my RLS program.
    ... subplot ... ylabel ... plot; grid on ...
    (comp.soft-sys.matlab)
  • Re: Changing methods of writing
    ... I think how it works is that it starts with me having necessary plot ... which is also related to point C. --So that's the other reason it's ... subplot, but I don't think that's what you mean by linking subplots. ...
    (rec.arts.sf.composition)
  • Re: subplots in a GUI
    ... if radiobutton2 is selected then i want to do a subplot of 3 ... switch selection ... I don't know - I don't use subplotin an axes (like one I placed on ... just have 4 axes and just plot ...
    (comp.soft-sys.matlab)