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

How to change scale on the X-axis of a chart?

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


Joined: 10 Dec 2005
Posts: 3

PostPosted: Wed Jan 26, 2011 2:18 pm    Post subject: How to change scale on the X-axis of a chart? Reply with quote

I have a data table with a column containing timestamps (if that makes difference they have an interval of 4, so it's 0,4,8,12,.... ) and in another column a value I want to display on a chart.

I have created a chart with data range as follows: Y-Values: $Tabelle1.$Y$14:$Y$923 (column with the values) and Categories: $Tabelle1.$A$14:$A$923 (column with the timestamps)

The graph displays fine, but I have no possibility to edit the X-axis scale. When I right-click Format axis / Scale, all fields grayed out, including 'Automatic' checkboxes, which are all checked. Since they are grayed out, I cannot disable Automatic scaling in order to edit it.

The same works with Y-axis though - there I can disable and edit scale. Any idea how to deal with it?
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Fri Jan 28, 2011 2:04 pm    Post subject: Reply with quote

If you change the Chart Type to X-Y (Scatter) the x axis will be a value axis, not a category axis, and you will be able to edit its Scale properties.

Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
beo
General User
General User


Joined: 17 Nov 2010
Posts: 7

PostPosted: Mon Aug 01, 2011 8:35 pm    Post subject: X,Y scatter doesn't work with time scales, though Reply with quote

At least not when the scale runs over the length of a day. Instead of continuing a line, the chart plots another line above or below for the next day.

Why is it that the x-axis scale in a line chart cannot be changed manually? This is really annoying. I have data running over the period of a week at 5 minute intervals, and with the automatic scale my chart is utterly unreadable. I would like to scale for every 4 hours or so.
Again: X,Y scatter graphs do not work here. Is there another workaround?
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: Tue Aug 02, 2011 3:06 am    Post subject: Re: X,Y scatter doesn't work with time scales, though Reply with quote

beo wrote:

Why is it that the x-axis scale in a line chart cannot be changed manually?


Because it's not a scale? It is just a list of categories. To a line chart there is no difference if the x-axis is 1,2,3,4 or A,B,C,D.

Quote:
This is really annoying. I have data running over the period of a week at 5 minute intervals, and with the automatic scale my chart is utterly unreadable. I would like to scale for every 4 hours or so.
Again: X,Y scatter graphs do not work here. Is there another workaround?


Without seeing the data it's difficult to suggest anything but I don't see why you could not adjust the x-scale in an x-y graph. It is a matter of the unit used?
_________________
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
keme
Moderator
Moderator


Joined: 30 Aug 2004
Posts: 2910
Location: Egersund, Norway

PostPosted: Tue Aug 02, 2011 4:23 am    Post subject: Reply with quote

Why is the X/Y scatter diagram unusable?

You can emulate a bar chart in an x/y plot by using error bars (negative 100% error only, or both with positive error set to 0).

Workaround when you can't use proper x-axis (X/Y diagram):
To have a "category chart" with interspersed labeling, I believe you need to insert "label entries" in the source data.
You could create a new column with labels for this. An example (insert into a free column, row 15, and copy down):
=IF(MROUND(A15;1/6)>MROUND(A14;1/6);A15;"")

Use that new column for your categories instead of the A column. You may need to format it explicitly to the desired time format.
Back to top
View user's profile Send private message
beo
General User
General User


Joined: 17 Nov 2010
Posts: 7

PostPosted: Tue Aug 02, 2011 12:58 pm    Post subject: Reply with quote

Thanks for the suggestions!
"Scale" was probably misleading; what I want is every 48th item of the category ( which associates time with a a range of measurements taken over a week) to appear as label on the x-axis
I can see a workaround for this, but as I have ten thousands of data, it will require some effort to restructure the label column.
I hate to say it, but in Excel this is very easily achieved with the x-axis scale, by tweaking the label intervals. Why is this option missing in the line chart in Calc?

Again: x,y scatter plots for recurring times of days in the week in 7 different lines - I want a continuous line to show effects over the week.
Any ideas?
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Tue Aug 02, 2011 4:20 pm    Post subject: Reply with quote

Maybe like in attached doc (Dummy Scaling of Line Chart Category Axis.ods)...
http://www.mediafire.com/view/?tbbdyvgag2ltdka
I've added a dummy series of zeroes to act as tick marks.
The markers for this dummy series have been adjusted to be black squares 0.01 cm wide and 0.15 cm high to look like tick marks.
I had trouble getting the category labels to stop being staggered. When I selected the Tile option under the Order heading on the Label tab sheet of the x-Axis dialogue, all bar the first label disappeared. I had to change to the other options several times before the Tile option would work. Seems to be a bug.

Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).


Last edited by ken johnson on Sun Sep 30, 2012 5:18 am; edited 1 time in total
Back to top
View user's profile Send private message
keme
Moderator
Moderator


Joined: 30 Aug 2004
Posts: 2910
Location: Egersund, Norway

PostPosted: Tue Aug 02, 2011 11:17 pm    Post subject: Reply with quote

Seeing your file, I can give some more guidance.

The B and C columns hold date and time of day, stored as text. Those are in (fairly) unambiguous formats, so they can be safely converted to numeric time form and added, to yield a proper time reference. Column K is empty, so I use that.

K2: =VALUE(B2)+VALUE(C2)
Copy down along your table.

Basically, use that as the X value, and format the output of the X axis to show the desired X values (you can alter formatting in the K column or directly in your graph).

It takes a little tweaking to make this look good. See if what I sent you through PM is something you can use.
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