File Exchange

image thumbnail

plotyyy

version 1.0 (2.15 KB) by

PLOTYYY - Extends plotyy to include a third y-axis

4.47222
38 Ratings

185 Downloads

Updated

View License

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

Comments and Ratings (50)

Lijing Chen

Great

Jinghui Wu

thank you

rainy cao

good,it is useful.

fanliao wang

good

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

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.).

How could I make this? please help me

rahul ranjan

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

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!

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

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.

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

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

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?

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

marc Oshe

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

Brigh (view profile)

Jutao

Jutao (view profile)

Oleg

Oleg (view profile)

Ana C

Ana C (view profile)

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

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];
- pos(3)=pos(3)-offset; instead of pos(3)=pos(3)-offset/2;
Thanks

Jakob Sievers

Jakob Sievers (view profile)

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

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.

good, thanks

Wu Zhiyong

Thanks, very useful!

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

Cheers

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

Thanks for coming up with a way of adding additional axes.

robs goldy

Very good

Olivier G

small and simple but useful

MATLAB Release
MATLAB 6.1 (R12.1)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video