Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to plot a plotyy in an gui

Status
Not open for further replies.

x12345

Industrial
Dec 15, 2004
3
How can I plot a plotyy in a gui? The code...

axes(handles.TSchart);
[TSrp]=plotyy(1:rrows,r,1:rrows,p);
set(get(TSrp(1),'Ylabel'),'String','Coefficient r')
set(get(TSrp(2),'Ylabel'),'String','p-Value')
title(TSheader(1,i));
xlabel('lag (return)');
grid on

...gives an error:

??? There is no 'NextPlot' property in the 'uipanel' class.
Error in ==> plotyy at 58
set(fig,'NextPlot','add')

What am I doing wrong?
Thanks for your help, Stefan
 
Replies continue below

Recommended for you

Hi,
Plotyy is a 2 axes figure (one on top of the other). The upper axes is transparent (color:'none') with no Xticks (Xtick:[]) and yaxis on the right hand.
You can create it using GUIDE with other objects.
To use it:
H=guihandles(gcf);
plot(1:rrows,r,'parent',H.axes1);
plot(1:rrows,p,'color','r','parent',H.axes2)

I hope this helps.

Joe Sababa

BSTeX - Equation viewer for Matlab

Joe
BSTeX- Equation viewer for Matlab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor