Filter löschen
Filter löschen

How I can repositionng the ytick label ?

1 Ansicht (letzte 30 Tage)
Mahesh
Mahesh am 7 Sep. 2014
Kommentiert: Star Strider am 7 Sep. 2014
Dear all I would like to reposition the ytick label specially the origin or minimum label in ytick. In that sense I want to move the y tick label shown in original.png
to little bit up shown in
so that it is not close to x-tick label. Do anybody have any idea? It would be great to make my plot more clear.
Thanks in advance Mahesh

Akzeptierte Antwort

Star Strider
Star Strider am 7 Sep. 2014
Bearbeitet: Star Strider am 7 Sep. 2014
The easiest way to do that would be to use the axis function, possibly including the handle graphics function to set the YTick positions and labels. Experiment with something like:
x = linspace(0,2*pi,250);
y = sin(4*x).^2;
figure(1)
plot(x, y)
axis([0 2*pi -0.05 1]);
set(gca, 'YTick', [0 1])
until you get the result you want.
  2 Kommentare
Star Strider
Star Strider am 7 Sep. 2014
Mahesh’s ‘Answer’ moved here, because it is a comment:
I think this is just the limits of ytick values. I want to move the origin of yaxis label not the limit. Thanks for suggestion. If you have better one, that is appreciated.
Star Strider
Star Strider am 7 Sep. 2014
My code does exactly what you want:

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by