Filter löschen
Filter löschen

How to get and set ylabel position in normalized units?

8 Ansichten (letzte 30 Tage)
Mr M.
Mr M. am 5 Jul. 2017
I would like to shift (increase the gap) for ylabel. The standatd method is the following: ylabh = get(gca,'ylabel'); set(ylabh,'position',get(ylabh,'position') - [shift 0 0]);
But how to get and set this in normalized coordinates? I cannot figure out.

Antworten (1)

alice
alice am 5 Jul. 2017
Bearbeitet: alice am 5 Jul. 2017
You can set the units to normalized first:
...
set(ylabh,'Units','normalized');
set(ylabh,'position',get(ylabh,'position') - [shift 0 0]);
  1 Kommentar
Giuseppe Naselli
Giuseppe Naselli am 6 Feb. 2018
the solution you proposed gives a error (below)
Error using ylabel (line 16)
Not enough input arguments.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by