plotyy without specified x values

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

plotyy without specified x values

Fritz Sonnichsen
I want to do a double y plot:
==== read data =====
plotyy(x,y1,x,y2)

However the x values are not specified in the file thus I just want to
plot the y sequences without specifying x. So I am looking for something
like:
plotyy(: , y1 , : , y2)

This syntax does not work for course. Is there a way to do this?

Thanks
Fritz



Reply | Threaded
Open this post in threaded view
|

Re: plotyy without specified x values

Doug Stewart-4


On Fri, Mar 30, 2018 at 11:50 AM, Fritz Sonnichsen <[hidden email]> wrote:
I want to do a double y plot:
==== read data =====

plotyy(x,y1,x,y2)
However the x values are not specified in the file thus I just want to plot the y sequences without specifying x. So I am looking for something like:
plotyy(: , y1 , : , y2)

This syntax does not work for course. Is there a way to do this?

Thanks
Fritz



set 
x=1:numel(y)
then use
plotyy(x,y1,x,y2)

--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: plotyy without specified x values

Fritz Sonnichsen
That was fast! Thanks
Fritz

On 3/30/2018 11:54 AM, Doug Stewart wrote:


On Fri, Mar 30, 2018 at 11:50 AM, Fritz Sonnichsen <[hidden email]> wrote:
I want to do a double y plot:
==== read data =====

plotyy(x,y1,x,y2)
However the x values are not specified in the file thus I just want to plot the y sequences without specifying x. So I am looking for something like:
plotyy(: , y1 , : , y2)

This syntax does not work for course. Is there a way to do this?

Thanks
Fritz



set 
x=1:numel(y)
then use
plotyy(x,y1,x,y2)

--
DASCertificate for 206392