Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Charts y-axis values

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?

like image 402
user592419 Avatar asked May 23 '12 18:05

user592419


People also ask

What is y axis scale?

(Default) A linear scale on the Y axis represents equal distance and change on a chart. So for example, if grid lines are enabled, a change of three spaces on a line graph may represent an increase of 3MB of data.

How do I show a value in a column chart in Google Sheets?

Right click on the chart. Click on "Customization" tab. Drag the bar and keep going down until you see "Data Labels" with a drop down below it. Choose "value" from this list of options.


1 Answers

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

like image 123
Vortexfive Avatar answered Oct 04 '22 16:10

Vortexfive