Page 1 of 1

[Solved] Creating graphs with both axes scaled to reflect values

Posted: Fri Oct 28, 2022 2:52 pm
by migimohidarimo
When you have two sets of numbers which are not evenly spaced and use one set for the x axis and one for the y axis, the scale does not represent the numbers on both axes. Is there a way to change that behaviour?

eg using the two sets:
0 40 75 100 125 160
0 20 50 100 150 180
To get a single line, I could use the first row as labels but they would then treated as labels (obviously) and not values so the distance between 0 and 40 would be the same as the distance between 75 and 100. I'd like to plot the graph using the two sets of values like (x,y) co-ordinates with a linear scale on both axes.

I'm sure the solution should be simple but it's escaping me.

Edit:
I should say I am not looking for a scatter chart. I want to be able to plot these with straight lines between the data points which should be on the line. They are effectively showing the points at which the straight line graph changes gradient.

Re: Creating graphs with both axes scaled to reflect values

Posted: Fri Oct 28, 2022 3:40 pm
by MrProgrammer
migimohidarimo wrote: Fri Oct 28, 2022 2:52 pm I'd like to plot the graph using the two sets of values like (x,y) co-ordinates with a linear scale on both axes [scaled to reflect values].
That is chart type XY (Scatter). You can set the scales on the two axes so they are the same (or any other desired scaling) using Format → Axis → [X or Y] Axis → Scale. No other OpenOffice chart type allows for numeric values and scaling (as opposed to categories) on two axes.
Calc Guide: Chapter 3 - Creating Charts and Graphs, page 20

migimohidarimo wrote: Fri Oct 28, 2022 2:52 pm I want to be able to plot these with straight lines between the data points which should be on the line. They are effectively showing the points at which the straight line graph changes gradient.
I do not understand what your sentences mean. Perhaps you could draw what you want using paper and pencil, photograph it, and upload that.

[Tutorial] Ten concepts that every Calc user should know

Re: Creating graphs with both axes scaled to reflect values

Posted: Fri Oct 28, 2022 3:41 pm
by John_Ha
Like this?
Clipboard01.gif
Clipboard01.gif (13 KiB) Viewed 1245 times
See Chapter 3 - Using Charts and Graphs in the Calc User Guide. May I suggest you bookmark the page.

That being said Calc is not very good for plotting scientific graphs. If you don't need the graph to be in a spreadsheet then search the web for graph plotting websites and/or programs.

Re: Creating graphs with both axes scaled to reflect values

Posted: Sat Oct 29, 2022 12:38 am
by migimohidarimo
John_Ha wrote: Fri Oct 28, 2022 3:41 pm Like this?
Yes.
Looking at the properties of the graph I realised I'm missed the line type property. Setting it to straight gives me what I need. I'd always thought of scatter charts as a method of showing trends where the line doesn't necessarily pass through the exact data points.
Even having understood how to do what I wanted, looking through the manual I couldn't find anything about that would have led me to the same conclusion but the properties of the graph in your example made it clear. Problem solved.
Thank you