OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

plotting several overlapping data ranges on an XY plot

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
nazg00l
Newbie
Newbie


Joined: 25 Jan 2006
Posts: 3

PostPosted: Wed Jan 25, 2006 11:36 am    Post subject: plotting several overlapping data ranges on an XY plot Reply with quote

Is there any way to plot several data series on a common XY chart? Individual series cover the same X range, but the actual sampling points are different so there is no way to bring them to a "common X" format.

Simply specifying the ranges separated with semicolons produces a chart that looks OK, but all the series are treated as the same data range and therefore cannot be formatted individually. Not to mention that the end of one series gets connected with a line to the start of the second series and so on. How can this be done? It is a trivial function in plotting software like Origin or Grapher, but I can't seem to find an "Add Data Series to Chart" function in Calc... I have searched the Net, but can't find anything useful.

Any help will be greatly appreciated!

Andrzej Sawula
Back to top
View user's profile Send private message
jrkrideau
Super User
Super User


Joined: 08 Aug 2005
Posts: 6732
Location: Kingston ON Canada

PostPosted: Wed Jan 25, 2006 12:48 pm    Post subject: Re: plotting several overlapping data ranges on an XY plot Reply with quote

nazg00l wrote:
Is there any way to plot several data series on a common XY chart? Individual series cover the same X range, but the actual sampling points are different so there is no way to bring them to a "common X" format.


You've lost me here. Are you saying that the X -axis is too large or that the Y-axis is too large?

Quote:
Simply specifying the ranges separated with semicolons produces a chart that looks OK, but all the series are treated as the same data range and therefore cannot be formatted individually. Not to mention that the end of one series gets connected with a line to the start of the second series and so on. How can this be done? It is a trivial function in plotting software like Origin or Grapher, but I can't seem to find an "Add Data Series to Chart" function in Calc... I have searched the Net, but can't find anything useful.

Any help will be greatly appreciated!

Andrzej Sawula


I think I am missing something here but why not just put the different ranges of the y variable in separate columns and graph them? You maintain a common x-axis and have separate descrete lines for each y-variable.
_________________
jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
Back to top
View user's profile Send private message
nazg00l
Newbie
Newbie


Joined: 25 Jan 2006
Posts: 3

PostPosted: Wed Jan 25, 2006 1:19 pm    Post subject: Reply with quote

OK, so an example would go like that:

Two series of data, both covering the 0-10 X range.

Series 1:
Code:
X: 1  3  4  6  7  9  10
Y: something

Series 2:
Code:
X: 1  2  3  5  6  8  10
Y: something


So both series cover the same range, but the actual X points (sampling points) are different. X is real, not integer, of course... So building a common X column is impossible.
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Wed Jan 25, 2006 2:31 pm    Post subject: Reply with quote

This is a digital machine, so you can't get continuous "real" values". In that case, determine at first your required accuracy [and it is a graph, so you won't see minute differences over a large amount of data.] With that in mind, suppose you set up a list of values down column A, such as 0, 0.1, 0.2, 0.3, .... Yes, you'll have a hundred, but there's lots of room and assitance with that by dragging a series. Then you can have one set of relational results in column B and another in column C. Choose all to draw the graph, then change axis values later [steps of 1?]

Personally, I'd use available math programs for this sort of thing, not a spreadsheet. I've mentioned a couple in the recent and distant past

David.
Back to top
View user's profile Send private message
jrkrideau
Super User
Super User


Joined: 08 Aug 2005
Posts: 6732
Location: Kingston ON Canada

PostPosted: Thu Jan 26, 2006 6:19 am    Post subject: Reply with quote

nazg00l wrote:
OK, so an example would go like that:

Two series of data, both covering the 0-10 X range.

Series 1:
Code:
X: 1  3  4  6  7  9  10
Y: something

Series 2:
Code:
X: 1  2  3  5  6  8  10
Y: something


So both series cover the same range, but the actual X points (sampling points) are different. X is real, not integer, of course... So building a common X column is impossible.


Why? I must be really missing something here. If x is real I don't see that it matters. You have a x-axis range from 1-10 and values for Y1 and Y1 so that all (x,y) points are within the 1-10 range. Presumabley both x and y are continuous variables. That's all you need.

It is only when the x-axis is categorical that you need to have the same x-values, that is, for something like a line chart or a bar chart. The choice of the numbers on the x and y axes for an XY graph are purely arbitrary ( well as long as we include the 1-10 range Smile )
_________________
jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
Back to top
View user's profile Send private message
nazg00l
Newbie
Newbie


Joined: 25 Jan 2006
Posts: 3

PostPosted: Fri Jan 27, 2006 2:42 am    Post subject: Reply with quote

Yes, that should not matter - but it does. When processing a 2nd series of data, Calc expects the Y data to correspond to the 1st column X values, not to their own specified ones...
EDIT: I found a way to do this. Somewhat counterintuitive and limited, but still... The solution is to insert X data in the 1st column and then individual series of Y data in individual columns, like that:
Code:
series 1 X | series 1 Y |
series 1 X | series 1 Y |
series 1 X | series 1 Y |
   ...     |    ...     |
series 1 X | series 1 X |
series 1 X | series 1 X |
series 2 X |            | series 2 Y
series 2 X |            | series 2 Y
series 2 X |            | series 2 Y
   ...     |            |    ...
series 2 X |            | series 2 Y

The problem with such a "solution" is that the maximum number of rows is 65535, which limits the size of data if one wants to plot e.g. 10 series on the same chart... But it should work for me still.

Thanks everybody for your input!
Back to top
View user's profile Send private message
jrkrideau
Super User
Super User


Joined: 08 Aug 2005
Posts: 6732
Location: Kingston ON Canada

PostPosted: Fri Jan 27, 2006 5:46 am    Post subject: Reply with quote

nazg00l wrote:
Yes, that should not matter - but it does. When processing a 2nd series of data, Calc expects the Y data to correspond to the 1st column X values, not to their own specified ones...
EDIT: I found a way to do this. Somewhat counterintuitive and limited, but still... The solution is to insert X data in the 1st column and then individual series of Y data in individual columns, like that:
Code:
series 1 X | series 1 Y |
series 1 X | series 1 Y |
series 1 X | series 1 Y |
   ...     |    ...     |
series 1 X | series 1 X |
series 1 X | series 1 X |
series 2 X |            | series 2 Y
series 2 X |            | series 2 Y
series 2 X |            | series 2 Y
   ...     |            |    ...
series 2 X |            | series 2 Y

The problem with such a "solution" is that the maximum number of rows is 65535, which limits the size of data if one wants to plot e.g. 10 series on the same chart... But it should work for me still.

Thanks everybody for your input!



Yes. That is what I tried to explain and didn't make clear. Sorry. Sad . I could see it in my mind.!

I think that David's suggestion of a dedicated math or graphics package is probably the best way to go. He has suggested two here http://www.oooforum.org/forum/viewtopic.phtml?p=121890&highlight=#121890 and I would add R http://www.r-project.org/ and gnuplot http://t16web.lanl.gov/Kawano/gnuplot/index-e.html

Spreadsheets are good for many things but specialised programs have there place when you need specific tools. And spreadsheets just don't have the graphics capacity for good scientific output in many cases.
_________________
jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group