The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: plotYY - the most annoying command in the world
Replies: 15   Last Post: Feb 24, 2010 3:48 PM

Advanced Search

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

Posts: 8
Registered: 2/14/10
Re: plotYY - the most annoying command in the world
Posted: Feb 14, 2010 6:00 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks for the reply.

This is my latest attempt. The series are plotted with common dates and the limits work for the x-axis. However, if I try and specify the Xticks or use datetick is goes all screwy?

[ax,h1,h2] = plotyy(datenum(X(:,1)),X(:,2),datenum(X(:,1)),X(:,3));
title('Excess Holding Period Returns (5 Year Matury Zero) plotted alongside uncertainty on Real GDP')
grid on
grid minor

set(get(ax(1),'Ylabel'),'String','HPRX', 'color','r')
set(ax(1),'XLim',[datenum(1980, 07, 01) datenum(2009, 07, 01)])
set(ax(1),'YLim',[-0.2 +0.2])
set(get(ax(2),'Ylabel'),'String','DiB', 'color','b')
set(ax(2),'XLim',[datenum(1980, 07, 01) datenum(2009, 07, 01)])
set(ax(2),'YLim',[0 1.0])

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.