# [SOLVED] - Attempting to make a graph in LibreOfficeCalc using an exponential Y-axis but i keep getting it wrong



## HTC (Apr 29, 2020)

So here's the original linear graph:




And here's the modification of the Y-axis to logarithmic:



I want each horizontal line to represent double the previous one, instead of ten times as much, so how do i do it?

The file from which i made the chart is attached but, so far, the totals column hasn't been filled yet: had to compress it into Zip format because ODS extension isn't allowed in attached files.


----------



## FordGT90Concept (Apr 29, 2020)

Not really sure what you're asking for but you can use sheet.columnrow to address data from a different sheet.  e.g. make a new sheet then do =Sheet1.B2 to copy the original value.  If you want to do an additive thing: =Sheet1.B2+Sheet1.B3 then propagate that down the entire column.  Get the raw data you want and graph away.

Placing a $ makes it absolute so it won't increment when dragged.


The first graph already looks like what you want, no?


----------



## ne6togadno (Apr 29, 2020)

you have to play with minor/major interval values





						Scale
					






					help.libreoffice.org


----------



## HTC (Apr 29, 2020)

FordGT90Concept said:


> Not really sure what you're asking for but you can use sheet.columnrow to address data from a different sheet.  e.g. make a new sheet then do =Sheet1.B2 to copy the original value.  If you want to do an adative thing: =Sheet1.B2+Sheet1.B3 then propagate that down the entire column.  Get the raw data you want and graph away.
> 
> Placing a $ makes it absolute so it won't increment when dragged.
> 
> ...


Nope. In the 1st graph, each horizontal line is 200 higher than the previous, which is a linear increase.

Instead of the logarithmic scale of the 2nd graph:

- 10000
- 1000
- 100
- 10
- 1

In the Y axis, i want something like:

- 3200
- 1600
- 800
- 400
- 200
- 100
- 50
- 25



ne6togadno said:


> you have to play with minor/major interval values
> 
> 
> 
> ...


Tried to mess with those but, so far, without success.


----------



## ne6togadno (Apr 29, 2020)

i dont think you'll be able to represent geometric progression with only start value and interval while not having info on how major/minor interval impact scaling intervals of the graph


----------



## HTC (Apr 29, 2020)

ne6togadno said:


> i dont think you'll be able to represent geometric progression with only start value and interval while not having info on how major/minor interval impact scaling intervals of the graph



This is supposed to be an attempt @ representing the progression of infected COVID-19 cases in Portugal. I've since added the accumulated totals.

Thus far, we have over 24K infected cases so the graph should go @ least as high as 25600, as per the scale i suggested in my previous reply. This will increase but, since the next value is 51200, there's a long way to go to reach it, hopefully.

My plan was to do this for several countries and then compare the shape of the lines from the charts.


----------



## Vya Domus (Apr 29, 2020)

From what I can understand what you want basically is instead of having a logarithmic scale in base 10, you want it in base 2. So each equally spaced tick on the vertical axis represents an increase in 2x instead of 10x. Right ? I don't think there is any straight forward way of changing it unfortunately, I could only find this :









						LibreOffice x-axis log2
					

I'm making a chart in LibreOffice, and for my data, I want the x-axis to be a logarithmic scale, but with base 2 instead of 10. How can I do that, if possible?




					askubuntu.com


----------



## FordGT90Concept (Apr 29, 2020)

Seems to work. Select graph -> Format -> Axis -> Y-Axis then make the tabs match below.


----------



## mtcn77 (Apr 29, 2020)

Vya Domus said:


> From what I can understand what you want basically is instead of having a logarithmic scale in base 10, you want it in base 2. So each equally spaced tick on the vertical axis represents an increase in 2x instead of 10x. Right ? I don't think there is any straight forward way of changing it unfortunately, I could only find this :
> 
> 
> 
> ...


I agree, there is no *an *option to select log base - glad to be mistaken.



FordGT90Concept said:


> But how is that any different than what it is now except in labeling?  If the inputs are the same  then nothing changes other than the labels...which you could hide and replace (Format -> Axis -> Y-Axis -> Label tab -> untick box).


It shows power law, base 2 that is.


----------



## HTC (Apr 29, 2020)

Vya Domus said:


> From what I can understand what you want basically is *instead of having a logarithmic scale in base 10, you want it in base 2*. So each equally spaced tick on the vertical axis represents an increase in 2x instead of 10x. Right ? I don't think there is any straight forward way of changing it unfortunately, I could only find this :
> 
> 
> 
> ...


Correct: that's what i want, then do it for a few countries and then *compare the shape of the lines* of the various graphs.



FordGT90Concept said:


> But how is that any different than what it is now except in labeling?  If the inputs are the same  then *nothing changes other than the labels*...which you could hide and replace (Format -> Axis -> Y-Axis -> Label tab -> untick box).


The shape of the lines changes.


----------



## mtcn77 (Apr 29, 2020)

Portugese! Eat yoghurt! And reach out to these guys who made the study. They are Greek and the study is only 4 years old.
I have an intuition that 'this' follows the nations who are most lactose intolerant. Sorry, if you find that disturbingly simple, much of null hypotheses are.





						What did you just say? Nicotinamide riboside reduces endurance capacity?
					

The oh-so trendy anti-aging supplement nicotinamide riboside reduces endurance capacity. Greek sports scientists at Aristotle University of Thessaloniki report this in the Journal of the International Society of Sports Nutrition. But even after reading the Greek study very carefully we'll still...



					www.ergo-log.com


----------



## ne6togadno (Apr 29, 2020)

you can change log base in excel.
didnt seen such option in libreoffice.

and i have to update my installation too ^^


----------



## FordGT90Concept (Apr 29, 2020)

I edited my post trying what Vya Domus linked, seems to work as intended.


----------



## Vya Domus (Apr 29, 2020)

HTC said:


> Correct: that's what i want, then do it for a few countries and then *compare the shape of the lines* of the various graphs.
> 
> 
> The shape of the lines changes.



You could just take the values for the y axis and take the log 2 of them and use those for the plotting with no logarithmic scale.


----------



## HTC (Apr 29, 2020)

FordGT90Concept said:


> I edited my post trying what Vya Domus linked, seems to work as intended.


I must be doing something wrong:



The current file with the accumulated totals is in attach, zipped again. It's only up to yesterday's results, so far.



Vya Domus said:


> You could just take the values for the y axis and take the log 2 of them and use those for the plotting with no logarithmic scale.


Dunno how to do that 



ne6togadno said:


> *you can change log base in excel.*
> didnt seen such option in libreoffice.
> View attachment 153189
> and i have to update my installation too ^^


No longer use Windows, so that's not an option.


----------



## mtcn77 (Apr 29, 2020)

HTC said:


> I must be doing something wrong:
> 
> View attachment 153190
> 
> ...


Have you tried to select the minimum '1' and minor interval '2'?


----------



## FordGT90Concept (Apr 29, 2020)

HTC said:


> I must be doing something wrong:
> 
> View attachment 153190
> 
> ...


It's _really_ important to set Major Interval to 0.30103 and Minor Interval Count to 10.


----------



## HTC (Apr 29, 2020)

mtcn77 said:


> Have you tried to select the minimum '1' and minor interval '2'?


Figured out my mistake: forgot to select "logarithmic scale" ... DUH ...  

This is what i was searching for:





Now, to polish things up, i just need to figure out the formula to have the accumulated totals more easily ... because i added the totals one by one ..., then change the names of the columns in the charts to "daily" and "accumulated", respectively. None of which i know how to do ...

Then repeat this but for other countries, and finally compare the shape of the lines in the graphs.


----------



## mtcn77 (Apr 29, 2020)

HTC said:


> Figured out my mistake: forgot to select "logarithmic scale" ... DUH ...
> 
> This is what i was searching for:
> 
> ...


You're doing great. Don't let it overbear on you.


----------



## FordGT90Concept (Apr 29, 2020)

Might I suggest the Column and Line graph?


----------



## HTC (Apr 29, 2020)

FordGT90Concept said:


> Might I suggest the Column and Line graph?


I posted the file with the data: you can see how i did it.

It would be much easier if, instead of inputting two sets of data (the daily totals + the accumulated totals), i could do it with just the daily totals and have spreadsheet calculate the rest for me.

I also added the dates one by one as well.


----------



## ne6togadno (Apr 29, 2020)

both solutions (with log2 of the data and with log scale of the axis)
i think log scales will fit your needs better

edit:


HTC said:


> I posted the file with the data: you can see how i did it.
> 
> It would be much easier if, instead of inputting two sets of data (the daily totals + the accumulated totals), i could do it with just the daily totals and have spreadsheet calculate the rest for me.
> 
> I also added the dates one by one as well.


in the c3 cell add  " =C2+B3 "
then move the cursor over the + at the bottom right of the cell hold Lclick and drag down along the column until you reach last row with data (or a bit more if you plan to add more data later)


----------



## mtcn77 (Apr 29, 2020)

HTC said:


> would be much easier if, instead of inputting two sets of data (the daily totals + the accumulated totals), i could do it with just the daily totals and have spreadsheet calculate the rest for me.


You could formulate if you set a different column adding the two upper columns into the field down a rank. So you have daily change(incidence)=x1, former total(prevalence, old)=x2, daily total=(prevalence, new). X3 is then x2 in the next rank. I haven't thought of it any other way, outside of iterations.

You set C3 to "=B3+C2" and C4 to "=C3" once rule is trained by you entering it(have to press enter for the whole C column), further modifications to field B(you just type in today's incidence) ought to train the next columns.


----------



## HTC (Apr 29, 2020)

mtcn77 said:


> You could formulate if you set a different column adding the two upper columns into the field down a rank. So you have daily change(incidence)=x1, former total(prevalence, old)=x2, daily total=(prevalence, new). X3 is then x2 in the next rank. I haven't thought of it any other way, outside of iterations.
> 
> You set C3 to "=B3+C2" and *C4 to "=C3"* once rule is trained by you entering it(have to press enter for the whole C column), further modifications to field B(you just type in today's incidence) ought to train the next columns.


But C4's value should be "=C3+B4" and not only "=C3", no?


----------

