MATLAB: Flipping image horizontally

Sometimes I want the x-axis to go from high to low values.

The first thing came to mind is to fliplr on the data, plot the results, then flip the xTickLabel of the resulting image. But sometimes asymmetry can result in erroneous line up of the data and xlabels.

Turns out there is an elegant solution:
set(gca, 'xdir', 'reverse')



About collapsedwavefn

I have a lot of thoughts. Some of them I'd like to share.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s