Borrar filtros
Borrar filtros

Double ticks in right axis plotyy

3 visualizaciones (últimos 30 días)
Sven Schoeberichts
Sven Schoeberichts el 23 de Nov. de 2011
Respondida: Daniel el 2 de Mzo. de 2015
On the right axis there's the tickmarks of the left axis visible. This is the code:
subplot( 3,2,2 )
[ AxesH1, hh1, hh2 ] = plotyy( frequency, fftrr, frequency, fftabscd);
set(AxesH1(1),'YLim',[ 0 ynewrr ]);
set(AxesH1(2),'YLim',[ 0 ynewcd ]);
line( Fmarkrr, Pmarkrr, 'linestyle', 'none', 'Marker', '*', 'Parent', AxesH1(1));
line( Fmarkcd, Pmarkcd, 'linestyle', 'none', 'Marker', '*', 'Parent', AxesH1(2));
xlabel( 'Frequentie (Hz)' )
title( 'HRV & MCD' )
ylabel( 'SP (a.u.)' )
hold off
What piece of my code could be causing this?

Respuesta aceptada

Sven Schoeberichts
Sven Schoeberichts el 20 de Dic. de 2011

Más respuestas (1)

Daniel
Daniel el 2 de Mzo. de 2015
I hit this issue as well when I changed the Ylim of the right plot. I got around it by changing the left plot Ylim in the same proportions (to realign the tick marks on the right and hide the left plot's behind the right plot's):
[hAx,hLine1,hLine2] = plotyy(X,Y1,X,Y2); set(hAx(2),'ylim',[0 1.2]); set(hAx(1),'ylim',get(hAx(1),'ylim').*[0 1.2]);
Cheers, Daniel

Categorías

Más información sobre Two y-axis en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by