Axes label start at specific point with custom labels
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
KL
2017-9-14
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 个评论
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!