Axes label start at specific point with custom labels

1 Ansicht (letzte 30 Tage)
Ingo Rück
Ingo Rück am 14 Sep. 2017
Beantwortet: KL am 14 Sep. 2017
Hello everyone,
I have contour plot displaying an efficiency chart of a machine. I want to set the axes labels so that their origin is the point of maximum efficiency, somewhere in the middle of my contour plot. I dont want to center the axes on that point in a cross shape, I just want the labels to start at that point as 1,1 instead of the points true value.
My plot is dynamic, changing with every set of data I load. Is there a way to make the labels always start at the point of maximum efficiency?
This image shows an example of such a chart, where the 1,1 coordinations are centered on the peak of the hill chart for a pump.
Thanks for your help!

Akzeptierte Antwort

KL
KL am 14 Sep. 2017
plot(rand(10,1))
xlabel('TADA')
hLabel = get(gca,'XLabel');
currPos = get(hLabel, 'Position');
newPos = currPos + [2 0 0]; %here goes your maximum efficiency
set(hLabel, 'Position', newPos);

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by