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: put date in x axis when using plotyy
Replies: 26   Last Post: Jul 14, 2014 9:50 AM

Advanced Search

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

Posts: 10
Registered: 7/11/14
put date in x axis when using plotyy
Posted: Jul 11, 2014 3:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a file consisting 10 columns of which columns 3-5 are dates in the form dd-mm-yyyy.
I use plotyy command:

a1=filename(:,2)
a2=filename(:,9)
[yaxes,a1,a2]=plotyy(filename(:,1),a1,filename(:,1),a2,'plot','stem')
%set axes labels and properties
set(yaxes(2),'ylim',[5.5 7]
set(yaxes(2),'ytick,[5.5:0.5: 7]
set(yaxes(1),'box','off')
axes(yaxes(1));
ylabel('y1')
axes(yaxes(1));
ylabel('a2')
title('plotdata')
set(a2,'colour','r')
set(a2,'marker','*')

,where filename(:,1) consist serial numbers and is my x axis.
What i want to do is replace filename(:,1) with filename(:,3:5) (i.e my dates) in the above form (dd-mm-yyyy).
I've tried using detevec,datenum,datestr and datetick but none of them is working right..
Can anyone help me with that?



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.