14
votes

I have a set of paired data:

[(x_1,y_1), (x_2,y_2), (x_3, y_3)] 

and I want to make an XYChart out of it using the python GChartWrapper library such that that the y-axis values are a transformation of the data.

A simple example is a log graph with the actual values on the side, e.g. if y_1, y_2, and y_3 represent log_10 values, then the graph will chart them as such but the labels on the y-axis could be 10^{y_1}, 10^{y_2}, and 10^{y_3}.

I've tried playing around with chxr for this but that doesn't work because then it's not just the labels on the axis that change, but the whole axis. For example, if I have the log one from above and my y values are 0, 1, 2. I would like the graph to look the same but the labels to instead be 10^0, 10^1, 10^2, i.e. 1, 10, 100. But because the gchart wants to preserve the scale, it then tries to make this into something where the range is from 0 -> 100 rather than just changing the labels.

How do I do this?

1
Aye. Thanks for the heads up on some older ones that I hadn't seen the answers to. - user592419
It might help to include some example output; see this SO question about Google Charts and GChartWrapper. - supervacuo
On a minor point, 10^0 = 1, not 0. - supervacuo

1 Answers

1
votes

Try using chxl to change the labels of the axis but not the range. API chxl