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

Making a graph with 2 Axis of Y with Calc

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


Joined: 27 Jan 2006
Posts: 26
Location: Dakar (SENEGAL)

PostPosted: Fri Jan 27, 2006 2:37 am    Post subject: Making a graph with 2 Axis of Y with Calc Reply with quote

I have a problem with Calc.

I would like to make a Graph with 2 Axis of Y.
for example

X 1 2 3 8 10
Y1 2 4 5 1 0

X 1 2 3 8 10
Y2 100 3000 5000 8000 30000

Y1 will be in the first axe of Y and Y2 in the second axe.
But i dont know who to it in Calc or by code.


Can you help me?
_________________
I love work.
Back to top
View user's profile Send private message
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

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

I'm new to OpenOffice, but in Excel you would select the line you want to appear on the second axis, right click or go to the Format menu or double-click the line, select the tab for axis, and select Secondary, then OK.

I would expect OOo to be nearly the same but it crashed on me when I tried it!. (v1.1.5)

I am assuming that you can already get a graph with the data on it, just that one series appears to be stuck down on the x-axis.

If this doesn't help, ask again.
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 6:00 am    Post subject: Reply with quote

RickRandom wrote:
I'm new to OpenOffice, but in Excel you would select the line you want to appear on the second axis, right click or go to the Format menu or double-click the line, select the tab for axis, and select Secondary, then OK.

I would expect OOo to be nearly the same but it crashed on me when I tried it!. (v1.1.5)

I am assuming that you can already get a graph with the data on it, just that one series appears to be stuck down on the x-axis.

If this doesn't help, ask again.


It is possible to have a second y-axis but it does not scale to the second data series. The scale comes from the first series.

To get a second axis, right click on the graph, select edit and then Insert>Axes>Secondary Y-axis.

If you want to have two independent scales, the only way that I can see to do this is to transform one of the dataseries and set the scale abritrarily. Thus for your example I'd considersomething like dividing the second series by 100, plotting that and setting the scale to the orginal values. To edit the scale values on the axis, right click on the graph, select edit and then Format> Axis >Secondary Axis > Scale
_________________
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
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Fri Jan 27, 2006 8:15 am    Post subject: Reply with quote

I think jrkrideau and I are slightly at cross-purposes.

My method is:

1. Highlight the cells to be graphed, including the cells for the labels, the X values, and the two rows of Y values.

2. Using the menus, Insert->Chart, and follow the steps, e.g. X-Y graph, etc.

3. When the graph is created, one of the lines will be almost flat down on the x-axis, because it has the small Y values.

4. Right-Click on the graph and select Edit.

5. Double-Click on the line that fits the chart size, and you will get a window titled "Data Series". Select the Options tab, and select 2nd Y axis.

If I knew how to get pictures in this forum, I'd put in the screen shots.

If this succeeds, let me know - I'm only starting with OpenOffice.
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 9:45 am    Post subject: Reply with quote

RickRandom wrote:
I think jrkrideau and I are slightly at cross-purposes.

My method is:

1. Highlight the cells to be graphed, including the cells for the labels, the X values, and the two rows of Y values.

2. Using the menus, Insert->Chart, and follow the steps, e.g. X-Y graph, etc.

3. When the graph is created, one of the lines will be almost flat down on the x-axis, because it has the small Y values.

4. Right-Click on the graph and select Edit.

5. Double-Click on the line that fits the chart size, and you will get a window titled "Data Series". Select the Options tab, and select 2nd Y axis.

If I knew how to get pictures in this forum, I'd put in the screen shots.

If this succeeds, let me know - I'm only starting with OpenOffice.


Nope we're not at cross purposes: Last week I tried to do what you have suggested and I could not find it so my suggestion was a work around. Thanks
_________________
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
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Fri Jan 27, 2006 10:00 am    Post subject: Reply with quote

I managed to get it to work in 2.0 (downloaded today!)

If I could grasp how to put a screen shot, I'd show you the wndow and the result.

Any help on that? I don't know how I put a file from my hard drive as a link using the Img button.
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 1:14 pm    Post subject: Reply with quote

RickRandom wrote:
I managed to get it to work in 2.0 (downloaded today!)

If I could grasp how to put a screen shot, I'd show you the wndow and the result.

Any help on that? I don't know how I put a file from my hard drive as a link using the Img button.


These sites offer short-term hosting of files and is a very handy place to put an example file if you are having a problem and wish members of the forum to look at it. You can supply a link to it or if it is something like a screen shot you can include the image in your posting by putting the link in the [image] format.

mytempdir.com
http://www.mytempdir.com

sendmefile.com
http://www.sendmefile.com/

YourFileLink
http://www.yourfilelink.com/

If you are using Windows a very nice freeware program for taking screenshots is
IrfanView at http://www.irfanview.com/
_________________
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
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Fri Jan 27, 2006 6:40 pm    Post subject: Reply with quote

[img]http://www.mytempdir.com/413842[/img]

[img]http://www.mytempdir.com/413844[/img]

http://www.mytempdir.com/413844

http://www.mytempdir.com/413842

I don't seem to have got the hang of the mages yet!!
Back to top
View user's profile Send private message
bobharvey
Super User
Super User


Joined: 23 Apr 2004
Posts: 1075
Location: Lincolnshire

PostPosted: Fri Jan 27, 2006 11:46 pm    Post subject: Re: Making a graph with 2 Axis of Y with Calc Reply with quote

ekokoua wrote:
I would like to make a Graph with 2 Axis of Y.

This is rather a chestnut. It has been discussed here many times.
See http://qa.openoffice.org/issues/show_bug.cgi?id=3997 - Plans to improve Chart were dropped from 2.0 because of lack of resources.

The work-around is to merge the data into a single X axis
.
This is quite simple to do with copy-paste, and you can also sort if you think it looks tidier or to suit certain types of graph.

-------
searching these forums gave:
http://www.oooforum.org/forum/viewtopic.phtml?t=29549
http://www.oooforum.org/forum/viewtopic.phtml?t=30826
http://www.oooforum.org/forum/viewtopic.phtml?t=19306
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: Sat Jan 28, 2006 11:29 am    Post subject: Reply with quote

RickRandom wrote:
[img]http://www.mytempdir.com/413842[/img]

[img]http://www.mytempdir.com/413844[/img]

http://www.mytempdir.com/413844

http://www.mytempdir.com/413842

I don't seem to have got the hang of the mages yet!!


Looking pretty good Smile

Have you managed to get a Y-axis title on the secondary y-axis? Using your approach I have managed to get the secondary y-axis with the right scale and to format the numbers but I am unable to assign a title to it.
_________________
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
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Sun Jan 29, 2006 1:23 am    Post subject: Reply with quote

I can't seem to get a Secondary axis title.

If I put one in using Excel, then open the same file in Calc, the secondary title is not there. The secondary axis is there OK , just the Primary title on the left axis.

I guess the feature doesn't exist in Calc, but at least the Secondary axis is useable, and scalable, so the most important things are there.

My feeling is that Charting is something of a weakness in Calc, not critical, but Excel is slicker. Maybe it's that I'm high up on the Excel learning curve, low down on the Calc learning curve. I have now got Calc's Help working, so perhaps that will clear up a few things...

I'll keep on posting, as it helps me learn by helping solve other people's problems, and I get a kick out of it.
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: Sun Jan 29, 2006 8:07 am    Post subject: Reply with quote

RickRandom wrote:
I can't seem to get a Secondary axis title.

If I put one in using Excel, then open the same file in Calc, the secondary title is not there. The secondary axis is there OK , just the Primary title on the left axis.

I guess the feature doesn't exist in Calc, but at least the Secondary axis is useable, and scalable, so the most important things are there.

My feeling is that Charting is something of a weakness in Calc, not critical, but Excel is slicker. Maybe it's that I'm high up on the Excel learning curve, low down on the Calc learning curve. I have now got Calc's Help working, so perhaps that will clear up a few things...

I'll keep on posting, as it helps me learn by helping solve other people's problems, and I get a kick out of it.


Thanks. I think as bobharvey has pointed out, Charts & graphs is a weakness of OOo compared with Excel and possibly other spreadsheets. Mind you, I am of the general opinion that in most cases at least for scientific work one should use a dedicated graphing package anyway. Smile

At the moment, I think I'll have to attack the secondary axis title simply by using a Draw text box . Not elegant but it will work

Keep posting, you learn a lot and people get help !
_________________
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