Ask Your Question
0

Plot 2 data columns against each other - not time related

asked 2018-02-21 08:15:45 +0100

hengis gravatar image

updated 2018-02-23 19:02:06 +0100

Jim K gravatar image

I have two data columns which I would like to compare on a chart. Say current and voltage. I do not want a stacked chart. When I use a scatter chart, I get a jumble of connected lines. What I want is a single line showing the relation between the two columns.

EDIT:

Thanks for your suggestion [editor's note: referring to @Jim K's answer] but the current column is ordered like a time series. If the current column were not in numeric order then I don't think it will work.

Here is a copy of some of my data.

33  26
34  29
56  32
47  30
33  33
18  24
39  30
41  24
28  30
37  30
34  28
32  28
41  26
27  26
25  26
32  27
14  18
39  24

I would copy my scatter chart but it does not seem to copy.

edit retag flag offensive close merge delete

Comments

1

This might be one solution : When you choose a scatter chart, choose the one without lines (just shows the data points). Then add a "trend line" to the chart, to show the relationship between the x and y data.

ve3oat gravatar imageve3oat ( 2018-02-21 17:59:40 +0100 )edit

Please provide some example data. If there is a simple relationship between current and voltage, such as exponential, then the solution in my answer should work.

Jim K gravatar imageJim K ( 2018-02-21 22:03:27 +0100 )edit

Ther is not (not even approximately) a function-like dependence in the data. Left the values 32, 33, 34, 39 and 41 occur twice, and at least in two cases the associated right values are very different. If you want to get a "single line", basically a trendline out of this, you need to predefine a model (space of functions) to search for the approximating one in. Linear? Logarithmic? Whatever?

Lupp gravatar imageLupp ( 2018-02-23 20:01:14 +0100 )edit

I know but I see my data as linked pairs. There will be a relationship but there are other factors affecting the pairs. I am interested in trying to assess these factors so a graphical display might throw some light on the problem/challenge

hengis gravatar imagehengis ( 2018-02-26 11:10:04 +0100 )edit

So you have a real-world curve-fitting problem in three or more variables but for which you have measurements of only two (x and y). Real-world data is never tidy. If you can control at least one of the other variables, say z, perhaps the comments and answers here so far will enable you to measure and plot your x and y values for z=z1, then to measure and plot x and y again for z=z2, again for z=z3, and so on, until the relationship you are looking for becomes clear.

ve3oat gravatar imageve3oat ( 2018-02-26 17:41:28 +0100 )edit

4 Answers

Sort by » oldest newest most voted
0

answered 2018-02-21 22:02:15 +0100

Jim K gravatar image

Select only the chart and voltage columns, then use a scatter chart.

scatter chart

The file: scatter chart.ods

edit flag offensive delete link more
1

answered 2018-02-23 04:27:17 +0100

ve3oat gravatar image

updated 2018-02-23 19:20:58 +0100

Jim K gravatar image

You say that you want "a single line showing the relation between the two columns." I have to say that your data, taken in two columns as x and y, does not have a linear relationship, so a single line might or might not have much meaning, depending on the source of the data.

I plotted your data as a scatter diagram without interconnecting lines, just data points, and have added a "trend line" which is linear. To add a trend line, just put the chart in edit mode, then click on one data point to select all of them, then right click on the point to get a menu of options. Select "trend line" or other options.

I will try to attach the result (but bear with me as I have never done this before).

askLO-test.png

Is that what you had in mind?

edit flag offensive delete link more

Comments

1

Edited to display the image properly.

Jim K gravatar imageJim K ( 2018-02-23 19:21:34 +0100 )edit

I would assume that the term "single line" not was used to say "single straight line". Talking of diagrams, the term "line" is mostly used for any kind of line. The (English) dialogues concerning charts clearly use "line" in the more general sense.

Lupp gravatar imageLupp ( 2018-02-23 19:30:36 +0100 )edit
0

answered 2018-02-23 10:28:45 +0100

Lupp gravatar image

updated 2018-02-23 19:31:28 +0100

I suppose your data sequence ("like a time series") is not ordered (monotoniically increasing) by the column to be mapped to the x-axis . To get (in the background) the datapoints into the correct order for display under the assumption of a function-like dependence of two mesurables, you need to enable "Sort by x-values" for the chart type.

edit flag offensive delete link more
1

answered 2018-02-28 12:44:17 +0100

hengis gravatar image

I THANK you all for your suggestions. The sort by x values on a scatter chart without lines seems to produce what i want. the next step is to figure out the effects of other variables on this data. Again a big THANKS

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2018-02-21 08:15:45 +0100

Seen: 1,739 times

Last updated: Feb 28 '18