I have manipulated an image and want to ListPlot it. However, the result is not to my liking because the conventions for drawing images and plots are different. Images have the origin at the top left and increase in Y downwards while plots have the origin at the bottom left and increase in Y upwards.

What is the easiest way to reconcile the difference, preferably without manipulating the data?

$\begingroup$What do you mean by list plotting an image?$\endgroup$
– Yu-Sung ChangMar 31 '12 at 1:14

$\begingroup$You start with an image, process it, and end up with an array which you display with ListPlot.$\endgroup$
– EmreMar 31 '12 at 1:15

$\begingroup$Do you mean ListPlot or something like ArrayPlot or MatrixPlot. If you are refering to ArrayPlot/MatrixPlot then yes, they are different, the origin is in the bottom left vs. top left. You might try making your data an image again Image@data...$\endgroup$
– s0rceMar 31 '12 at 1:24

$\begingroup$As a good ol' neuroscientist, I wish that DataReversed could be applied to ListPlot and friends (we flip the y-axis on EEG signals- tradition!!!). I've used the {#, -#2} & @@@ solution in the past, the Line[args___] seems cool, but I sure wish this was just 'fixed' so DataReversed->True would just 'work'. Sigh.$\endgroup$
– flipApr 3 '15 at 23:07

2: Changing the origin in a 1D plot (ListPlot or Plot)

Use AxesOrigin -> {x, y} to change the origin to where ever you like. For example:

Plot[Sin[x], {x, 0, 2 Pi}, AxesOrigin -> {0.5, 0.5}]

3: Changing the direction of the y-axis (or x-axis) in a 1D plot

Flipping the y-axis in a 1D plot is a bit more involved and is a very common approach in displaying depth plots. You can implement this in Mathematica by negating your input to ListPlot and assigning custom ticks with a function. Here's an example:

I wrote some code for this a few years ago. Haven't looked at it in a long time but it may be useful. It is in the Wolfram library archive (that seems to have been all but abandoned by both users and Wolfram).

$\begingroup$I wish it did but I could not feed it to ListPlot. It says ArrayPlot et al only. Close...$\endgroup$
– EmreMar 31 '12 at 1:33

$\begingroup$@Emre, a simple example showing how you go from an image to ListPlot would help everyone - what is the data in your ListPlot and how does it relate to the image?$\endgroup$
– kglrMar 31 '12 at 1:41

$\begingroup$It's a 2D integer array. It can be from binarizing or segmenting the image. I want select all the pixels belonging to a particular cluster, using Position[filtered_image,n], which gives me a list of pixels, and run ListPlot.$\endgroup$
– EmreMar 31 '12 at 1:47

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.