From: dpb on 16 Feb 2010 15:31 dpb wrote: .... > But plotyy apparently isn't smart enough[1] to do anything except > concatenate the two time series into a single range; it doesn't have > enough sense to use two separately drawn axes to show disparate ranges > which makes the second set simply redundant and requires such kludges as > resorted to here when customizing. > > Should/could be improved... > > [1] Or more precisely, at least a few simple-minded tests weren't able > to do so if it does have some embedded logic to do otherwise. I haven't > read the code extensively... OK, I did read the m-file... When the axis limits are set prettified the x limits are set by: set(ax,'xlim',[min(xlim1(1),xlim2(1)) max(xlim1(2),xlim2(2))]) where ax is the vector of axis handles (left and right) and xlim1/2 are the respective lower/upper limits of the two input x vectors. There's no point in leaving both visible as drawn (other than being able to retrieve the values from the axis objects I guess is one, but since they're the same that seems superfluous). Would seem to be potential use for a 'X|Y|ZTickLabelVisible' property for each axis as well as just for the axis property itself. --
From: dpb on 16 Feb 2010 16:17 Paul wrote: .... > Dear Sirs, you are both gentlemen. Both methods work and also allow me > to pass my own x_tick labels. BTW, to clear the 2nd-axis labels only need set(ax(2),'XTickLabel',[]) The XTick array can be left as is... So, this method (more like a kludge but I'd say having to do datetick twice is as well) has the advantage of one call over two... :) --
From: Dave on 24 Feb 2010 13:14 HI All, I realize it's been a few days, but if anyone can help me with this I would be thrilled! I'm dealing with a problem in which I have a time series with labels that are milliseconds since the epoch (unix). I can convert these to date strings by invoking some java methods in matlab, but I can't seem to figure out how to get those strings to be the X- labels for a plotyy chart (I've got 2 time series that are on different Y scales, but share the X scale). Could anyone point me to something that would help with this? Thanks! Dave
From: Steven Lord on 24 Feb 2010 13:19 "Dave" <dlauer(a)gmail.com> wrote in message news:877f217b-7c1d-4d71-b415-c82288de3cfc(a)a18g2000yqc.googlegroups.com... > HI All, > > I realize it's been a few days, but if anyone can help me with this I > would be thrilled! I'm dealing with a problem in which I have a time > series with labels that are milliseconds since the epoch (unix). I can > convert these to date strings by invoking some java methods in matlab, > but I can't seem to figure out how to get those strings to be the X- > labels for a plotyy chart (I've got 2 time series that are on > different Y scales, but share the X scale). Could anyone point me to > something that would help with this? Have you tried DATETICK (as per my previous suggestion in this thread) or DATESTR to generate strings that you then use to SET the XTickLabel properties of _both_ axes whose handles are returned from PLOTYY? -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Dave on 24 Feb 2010 13:40 On Feb 24, 12:19 pm, "Steven Lord" <sl...(a)mathworks.com> wrote: > Have you tried DATETICK (as per my previous suggestion in this thread) or > DATESTR to generate strings that you then use to SET the XTickLabel > properties of _both_ axes whose handles are returned from PLOTYY? > > -- > Steve Lord > sl...(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ Hi Steve, Yes, actually since I posted that, I've had some luck. I've managed to convert the Java-generated strings to datenums, plot the chart, and then use dateticks to display the dates in the format I need. However, I'm still struggling with the frequency of the X axis labels. The chart only shows 6 timestamps - I'd like to get a lot more. Obviously I'm very new to Matlab, so thanks for the help! Dave
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Applying a function to a matrix Next: differentiating a piecewise function |