[Solved] Two charts in one

Discuss the spreadsheet application

[Solved] Two charts in one

Postby crowolo » Sat Nov 24, 2007 6:18 pm

hello,
say I have two x-y data:
X1: 1 3 5 || Y1: 1 9 25
X2: 2 4 6 || Y2: 4 16 36

I want to plot the two x-y lines in the same chart with oocalc, how do I do it? my problem is that I'm able to do it only with one line per chart.

thanks in advance
Last edited by crowolo on Sun Nov 25, 2007 12:36 pm, edited 1 time in total.
crowolo
 
Posts: 5
Joined: Sat Nov 24, 2007 6:09 pm

Re: Two charts in one

Postby Hagar Delest » Sat Nov 24, 2007 10:21 pm

Hi crowolo,

I don't think this is directly possible because the chart must have the same X axis. So the trick would be to have 3 columns instead of 4. In the first one, put your X values : 1, 2, 3, ..., 6. In the second column, put your first set of value in front of their X value. In the third column, put your second set of values.
You should have that (I put the values in columns) :
Code: Select all   Expand viewCollapse view
X  | Y1 | Y2
1  |  1 |
2  |    |  4
3  |  9 | 
4  |    | 16
5  | 25 | 
6  |    | 36

Then, select your 3 columns and create your chart (type is XY (Scatter)).

Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.
AOO 4.1.6 on Xubuntu 19.04 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28495
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Two charts in one

Postby acknak » Sat Nov 24, 2007 10:28 pm

Will one of these work?

I started with A1:D4 selected, then Insert > Chart. In the Wizard, I removed the "X2" data set, and changed the "Y2" set to use C2:C4 for the X values.

The secondary Y axis is activated from the finished chart by clicking on the data set > Object Properties > Options > Align data series to secondary Y axis = YES.
Attachments
chart_2xy.png
Sample 2 data set chart
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Two charts in one

Postby Hagar Delest » Sat Nov 24, 2007 10:45 pm

Well done. I knew I was not an advanced user of Calc but would never have thought it could work !
Will wait before posting next time :?
AOO 4.1.6 on Xubuntu 19.04 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28495
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Two charts in one

Postby crowolo » Sun Nov 25, 2007 12:34 pm

thanks, I did it.

I choosed the way hagar explained because:
- the chart with two y-axis has two different scale. I preferred to merge them.
- I didn't find this option:

acknak wrote:The secondary Y axis is activated from the finished chart by clicking on the data set > Object Properties > Options > Align data series to secondary Y axis = YES.

I don't understand where to click; I find the 'object properties' only when I'm on the chart but there isn't "options -> align data serie to secondary Y axis" there.

I forgot to say I'm using OO.o 2.2.1 on linux.
crowolo
 
Posts: 5
Joined: Sat Nov 24, 2007 6:09 pm

Re: [solved] Two charts in one

Postby crowolo » Sun Nov 25, 2007 12:44 pm

I found it. object properties when you are on the line of the chart :)
crowolo
 
Posts: 5
Joined: Sat Nov 24, 2007 6:09 pm


Return to Calc

Who is online

Users browsing this forum: No registered users and 24 guests