There isn't any direct way to reverse the Y axis (making lower numbers show at
the top and higher numbers below). This has come up a few times in the past,
but it looks pretty hard to implement. The directions of the X axis and Y axis
are such basic assumptions in the code, it looks like it would break a lot to
try to change it.
However, there is a method that might get you the results you want. You have
to alter the Y values in your data array like Y' = M - Y, where M is some
value larger than your largest Y value. Then you make a custom Y label
function with SetYLabelType('custom', 'my_label_function'), which returns M-Y
as the value, given Y. You should also set the Y data range to 0:M with
SetPlotAreaWorld. This will result in Y tick labels starting with 0 at the
top, and M at the bottom, with the data plotted accordingly. You can also move
the X axis to the top, along with its tick labels and tick marks.
There are probably some quirks with this, but I have 2 examples - a line plot
and a bar chart - that seem to work fine. I can put them up on the site
somewhere, if you want. Let me know.
(You aren't really doing OHLC charts, are you? I can't think of any reason
these would be valid with a reversed Y axis.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone
I was looking in the manual and can not find a way
do flip to the values in Y.
How can I do?
I'm using the model:
PHPlot # Example: OHLC (Financial) plot, basic lines, using
External data file, text-data
There isn't any direct way to reverse the Y axis (making lower numbers show at
the top and higher numbers below). This has come up a few times in the past,
but it looks pretty hard to implement. The directions of the X axis and Y axis
are such basic assumptions in the code, it looks like it would break a lot to
try to change it.
However, there is a method that might get you the results you want. You have
to alter the Y values in your data array like Y' = M - Y, where M is some
value larger than your largest Y value. Then you make a custom Y label
function with SetYLabelType('custom', 'my_label_function'), which returns M-Y
as the value, given Y. You should also set the Y data range to 0:M with
SetPlotAreaWorld. This will result in Y tick labels starting with 0 at the
top, and M at the bottom, with the data plotted accordingly. You can also move
the X axis to the top, along with its tick labels and tick marks.
There are probably some quirks with this, but I have 2 examples - a line plot
and a bar chart - that seem to work fine. I can put them up on the site
somewhere, if you want. Let me know.
(You aren't really doing OHLC charts, are you? I can't think of any reason
these would be valid with a reversed Y axis.)
eu preciso disso para gerar um gráfico de audiometria
Continued here
with code example