File Exchange

plotyyy

version 1.0 (2.15 KB) by

PLOTYYY - Extends plotyy to include a third y-axis

4.46341
44 Ratings

Updated

PLOTYYY builds upon plotyy to include a third y-axis. It also provides an easy way of labelling all three y-axes at once.

xue dong

nice

xue dong

xue dong (view profile)

when i use it,i can't get the figure...I don't understand hou to use the code.

Michelle ALMAKARI

Michelle ALMAKARI (view profile)

Hello Thank you for sharing your code. It is really helpful. I tried to modify it to get a logarithmic scale for all x and y axes, but for some reason it works perfectly for the 1st two y axes, but the third one is shifted to the right. Any ideas why or what could be the solution ?

Miguel Angel Ampuero Suarez

Miguel Angel Ampuero Suarez (view profile)

Miguel Angel Ampuero Suarez

Miguel Angel Ampuero Suarez (view profile)

Thank You Mrs. Denis. It was useful for my work.

Shiva Asapu

Scott Sleegers

Lijing Chen

Great

Jinghui Wu

thank you

rainy cao

rainy cao (view profile)

good，it is useful.

fanliao wang

fanliao wang (view profile)

good

Iris van der Veen

Iris van der Veen (view profile)

Hi, I have the same problem that fitou below asked:
I am using the function plotyyy and it works fine.
My problem occurs when change the 'xlim' (set(ax,'xlim',[1,12089]); )
The two first curve extend from the first Y axis to the second Y axis
wich is good because this area corresponds with path area. But the third
curve extends from the first Y Axis to the third Y axis wich is outside
of the path area.
As a result my third curve have a part outside of the path area..

Is anybody know how can I solve this ?

Jacqueline

shihabsat

shihabsat (view profile)

Dear Dr. Denis Gilber

this is really a great function, but I have a problem that I want to draw each function with different labels (dash, solid, itc.).

rahul ranjan

rahul ranjan (view profile)

hi, i have extended your code for plotting 4 variable in the same plot. i want to share the code with everyone.

Christian Hoey

liangsai liang

Kelley Sullivan

Kelley Sullivan (view profile)

Hi. Great code! I'm having trouble with data-tips though. I can get data tips to appear on the 2nd and 3rd axes, but not the first. Any ideas? Thanks!

Sergio Machaca

Sergio Machaca (view profile)

Hey, when I run your example, I'm getting an error that says "Out of memory. The likely cause is an infinite recursion within the program." I would appreciate any help with this.

wenzhu wang

wenzhu wang (view profile)

How to zoom in or zoom out the added line?

Wei Li

Wei Li (view profile)

Why my matlab can't implement this function? The warning says that "Error: Function definitions are not permitted in this context." Is it result from the lower version of matlab?

Marc Timmer

Tino K.

Tino K. (view profile)

Hey to everyone,

is it possible to have the third plot as a bar? I don't know how to solve the problem.

I would be pleased if somebody can give me an idea.

Elizabeth

Elizabeth (view profile)

Hey, thanks for the code! It works well for me!

However, I can't make the visibility off for the figure. Anyone knows?

Olivia Yarney

Olivia Yarney (view profile)

Works well except when using view(-90 90) to rotate the plot it only rotates the first two and not the last plot?

Thiago Seila

Andre

Andre (view profile)

anyone figure out how to use datetick for x axis with this function?

Daniele Morello

Daniele Morello (view profile)

Hi, if i would to use this function for "axes" of GUI instead of "figure"?

marc Oshe

marc Oshe (view profile)

Hello, thanks for the function plotyyy. I have a problem with x axis. It gives a far too wide area. How can I restrict the xlim such that I can have yearly axis? I tried to change the 'xlim' (set(ax,'xlim',[2001,2013]); ) but I just get error.

Brigh

Jutao

Oleg

Ana C

fitou

fitou (view profile)

Hello

I am using the function plotyyy and it works fine.
My problem occurs when change the 'xlim' (set(ax,'xlim',[1,12089]); )
The two first curve extend from the first Y axis to the second Y axis
wich is good because this area corresponds with path area. But the third
curve extends from the first Y Axis to the third Y axis wich is outside
of the path area.
As a result my third curve have a part outside of the path area..

Is anybody know how can I solve this ?

ww

ww (view profile)

Great function! However, I cant seem add an xaxis label. An example would be nice :)

karthik

karthik (view profile)

Zooming and data cursor problem .. .
only one layer is zooming . . .
what about other 2 layers . . .
plz help

Jakob Sievers

Jakob Sievers (view profile)

It appears my first comment failed to reach the page. Basically, if you want to use this in a subplot structure do:
- comment out "figure(..."
- pos=get(gca,'pos'); instead of pos = [0.1 0.1 0.7 0.8];
Thanks

Jakob Sievers

Jakob Sievers

Jakob Sievers (view profile)

correction to the second point:
I changed from
pos = [0.1 0.1 0.7 0.8];
to
pos=get(gca,'pos');
is what I was trying to say.

Stratos

qiong lin

qiong lin (view profile)

Hi,

First thanks for writing such a useful code. I have to add up to three axis and plotyyy works fine.

But the code only generates in new figure, and I didn't manage to generate the three axes into existing figure despite hard trying. Can you please show me how to solve the problem ?

To force the axes to generate in my existing figure, the code
'figure('units','normalized','DefaultAxesXMinorTick','on','DefaultAxesYminorTick','on')' in plotyyy.m is put in comment; plus, position unit converted in centimeter as is the case in my own figure.

The axis 1 and 2 show up, but not the third axis!!

Please any help would be really appreciated.

Miguel Ignacio Barrios

good, thanks

Wu Zhiyong

Wu Zhiyong (view profile)

Thanks, very useful!

Can the third line be changed to be a bar plot?

Cheers

Mario Liverpool

Mario Liverpool (view profile)

Very well done! thank u! :)

Karel Castro

Can't use it calling the file from path, but very useful, thanks! Also labels didn't works as is stated in the example.

Hassan Ri

does not plot two x axes, but plotxx is listed as one of the keywords

YI xu

cannot use in subplot, always generate in a new plot

Izru Garner

Easy to use, and very practical!

Anja Noser

Libor Wilda

looks realy good

Bejoy Mathews

Great...
Thanks a lot..
But do you know any which can plot 5 axes at once?

Si Betts

Chitra Parthiban

Thanks. It is very useful to plot and analysis the online data's together

Lina Chang

robs goldy

Very good

Olivier G

small and simple but useful

MATLAB Release
MATLAB 6.1 (R12.1)