Axes label start at specific point with custom labels
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ingo Rück
el 14 de Sept. de 2017
Respondida: KL
el 14 de Sept. de 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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167187/image.gif)
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 comentarios
Respuesta aceptada
KL
el 14 de Sept. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!