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: 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 ]
Paul

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
xlabel('Date','Color','k');
set(ax,'YColor','k','Box','on');
set(h1,'color','r','LineWidth',1.0)
set(h2,'color','b','LineWidth',1.0)

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]

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