Page 1 of 1
My First XY Chart
Posted: Sun Mar 28, 2010 7:21 pm
by eschamp
I have a spreadsheet with the following columns and data ranges:
A: date
B: odometer reading -- 100000 max
C: trip odometer
D: gas purchased
E: cost
F: cost/gal -- $5.00 max
G: MPG -- 20-40
I want an X-Y scatter plot of B, F and G vs A. I would like separate scales for each Y-axis value.
How do I get date as the X-axis and how do I get multiple Y-axis scales?
Thanks.
OOo 3.2 on Windows 7
Re: My First XY Chart
Posted: Sun Mar 28, 2010 8:55 pm
by acknak
Select a range of cells containing the data, then click the "Create Chart" button on the toolbar, then configure your chart with the steps that follow. The "Chart" button may a little hard to find by looking at the picture on it--it's a pie chart, but the version I have is too small to tell what it is. It's just to the right of the "Sort" buttons ("A..Z" and "Z..A").
You can have only two independent Y axes. If you need more than that, you'll have to use separate charts.
Re: My First XY Chart
Posted: Sun Mar 28, 2010 9:46 pm
by eschamp
"configure your chart with the steps that follow" doesn't quite do it for me. For example, I selected a rectangular range of data that included all columns and rows 200-250.
I selected XY chart and then removed the columns I didn't want. Then I produced the chart. The X-axis was NOT column A. The scale of the Y-axis was in dollars but 10s of thousands.
I'm a bit baffled. As I said, "How do I get date (A) as the X-axis and how do I get multiple Y-axis scales?"
Re: My First XY Chart
Posted: Sun Mar 28, 2010 10:01 pm
by eschamp
How do I change the legend so that it has text instead of Col G, etc.?
Re: My First XY Chart
Posted: Sun Mar 28, 2010 11:43 pm
by Cambirder
It might help if you could upload what you have done so far.
Re: My First XY Chart
Posted: Mon Mar 29, 2010 12:48 am
by eschamp
Cambirder wrote:It might help if you could upload what you have done so far.
You want a screenshot of the chart?
Re: My First XY Chart
Posted: Mon Mar 29, 2010 12:59 am
by acknak
"configure your chart with the steps that follow" doesn't quite do it for me.
Ok; fair enough.
1) Open the attached file
2) With A1 as the current cell, click on the "Chart" button in the toolbar. With no cells selected, Calc will try to find the extent of the data automatically, which is fine in this case.
3) Configure your chart with the steps that follow...
- Chart Wizard Step 1: Chart type: XY (Scatter). Click "Next"
Chart Wizard Step 2: Data Range (defaults are ok here). Click "Next"
Chart Wizard Step 3: Data Series: Select the data sets (columns) that you don't want and click the "Remove" button. At the end, you should have only "Odometer" and "Efficiency" left. The first column (date) will be used for the x values.
Click "Next"
Chart Wizard Step 3: Chart elements (defaults are ok here). Click "Finish"
4) To get the efficiency data on a separate axis, right-click on the data line in the chart and choose "Format Data Series"
5) Options > Align data series to: Secondary axis
You can watch that here:
http://www.youtube.com/watch?v=uWvu8293Y6E (YouTube is giving me an error at the moment, but eventually it should be available).
For general instructions on creating charts in Calc, see the Calc Guide:
http://wiki.services.openoffice.org/wik ... Calc_Guide, especially Chapter 3 Creating Charts and Graphs:
http://wiki.services.openoffice.org/wik ... and_Graphs
Oops--forgot the file...
Re: My First XY Chart
Posted: Mon Mar 29, 2010 1:16 am
by eschamp
Wow! But I couldn't find the attached file.
I'll try this with my file and let you know what happens.
Re: My First XY Chart
Posted: Mon Mar 29, 2010 1:25 am
by eschamp
Terrific! The secondary axis is rescaled to fit the data and does not start at zero!!
The first date in the table is 3/16/04 but the origin of the X-axis is 1/14/04. IS there any way to make the X-axis begin at my first data point?
Thanks.
Re: My First XY Chart
Posted: Thu Apr 01, 2010 12:15 am
by arnk
Click on chart to highlight it
Right click and select edit
Mouse over your x Axis until the pop-up says X Axis
Left Click to select X Axis
Right Click and select Format Axis
Select Scale Tab
Untick the Automatic check box for both maximum and minimum
Enter new values as you wish
You can zoom into a section of a chart doing this - no need to adjust the data ranges.
Al
Re: My First XY Chart
Posted: Thu Apr 01, 2010 1:18 am
by eschamp
Thanks, Al.
I started my graph at A6 so the legend does not have the correct words. How do I edit the legends?
Re: My First XY Chart
Posted: Thu Apr 01, 2010 2:12 am
by eschamp
Re: My First XY Chart
Posted: Thu Apr 01, 2010 2:27 am
by acknak
As far as I know, you cannot edit the legend text directly. The text shown in the legend comes from the cell range labeled "Name" in the chart data series dialog window. That cell range usually corresponds to the top row of the data table, but it can be anywhere.
Is that a silent movie?
Right: there is no audio.