Matlab - reverse value of axis in plot [duplicate]
Possible Duplicate:
How do I edit the axes of an image in MATLAB to reve开发者_JAVA百科rse the direction?
The colour image is plotted using the image
function based on some information obtained using imread
function and for the white and blue image basically I am selecting the coordinates of the heat point(red and blue and their variations basically) from the map and then displaying them using plot
function.
By default, matlab draws graphs with (0,0) at the bottom left corner. However, it draw images with (0,0) in the top-left corner.
You can change the image axes to standard bottom-left origin by using the command
axis xy;
Remember to make sure that your image is the currently selected figure.
Use rot90()
to rotate the matrix, or a combination or fliplr()
(flips matrix, left and right) and flipud()
(flips matrix up and down) that produced the heat map image.
If you are plotting an image and you don't want to see the axis tic marks you can turn them off with
axis off
if you are interested in changing the direction of either the x-axis and/or y-axis in an axes handle-object, you can use the set function as follows
set(axesHandle,'XDir','rev','YDir','rev')
where you use XDir or YDir (or both) based on the axis you want reversed.
精彩评论