Axes label start at specific point with custom labels
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
KL
on 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 Comments
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!