![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/618008/image.png)
how do you revese the direction of an axis on a sub plot
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a sub plot of an image and I want to set the direction of the y axis. I can do this for an image that is not a sub plot. I suspect that it has something to do with selecting/setting the current axis but I haven't been able to figure out how to do it. I've tried any number of way to set the current axis, set the figure handle etc.. Nothing works.
image_subplot=subplot('Position',[0.10, 0.35, 0.80, 0.60])
set(parent_figure_handle, 'currentaxes', image_subplot)
set(gca,'YDir','normal')
imagesc(image)
0 comentarios
Respuestas (1)
DGM
el 14 de Mayo de 2021
Set the properties after the call to imagesc(), otherwise they get reset
A = imread('cameraman.tif');
subplot(1,2,1)
imagesc(A)
axis equal
axis tight
subplot(1,2,2)
imagesc(A)
axis equal
axis tight
set(gca,'ydir','normal')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/618008/image.png)
0 comentarios
Ver también
Categorías
Más información sobre Subplots 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!