Axes label start at specific point with custom labels
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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!
0 Kommentare
Akzeptierte Antwort
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);
0 Kommentare
Weitere Antworten (0)
Siehe auch
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!