Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Reference a vector to a plot
Replies: 6   Last Post: Jan 20, 2011 5:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Markus Due Jakobsen

Posts: 43
Registered: 4/29/08
Re: Reference a vector to a plot
Posted: Nov 30, 2010 3:05 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Walter Roberson <roberson@hushmail.com> wrote in message <2DSIo.284$Ny7.278@newsfe11.iad>...
> On 26/11/10 8:23 AM, Markus Due Jakobsen wrote:
>

> > Is it possible to reference a vector to a plot without constantly
> > re-setting the plot settings i.e. &#8216;xdata&#8217; and
> > &#8216;ydata&#8217;?

>
> Newish versions of Matlab offer the ability to set the X Data Source and
> Y Data Source to variables -- though you might have to call the
> refresh() function to activate the changes.


Hi Walter

Thanks a lot for your reply, this was very helpful.
However, the refreshdata method doesn&#8217;t seem to work with multiline plots.

%% Example:
y = rand(100,3);
h = plot(y); set(h,'YDataSource','y');
pause(1)
y=y(1:10,:);
refreshdata(h);
>> ??? Error using ==> refreshdata at 58
>> Could not refresh YData from 'y'.


How can this be and is there a way to work around it?

Regards
Markus



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.