Hello,
I use Calc to monitor the weight gain in newborn kittens at our cat shelter. I set up the chart in a quite satisfactory way - it's a XY scatter, and the X axis has 7-day major grid interval and 1-day minor grid interval.
But the graph doesn't start on the left: it starts at the beginning of the first week. I.e. if the weight measurements start on a Thursday, I get a white space on the graph for Monday-Wednsday.
How can I tell it to start plotting at the beginning of recorded data, even if it doesn't match the primary grid?
Or alternatively, can I tell it to start a major grid interval at the day of the first recorded data, instead of the beginning of the week?
Right now, the Major Interval is set at 168:00:00 (7 days) and the minor interval count is set to 7.
I can attach one of the files if needed.
Thanks,
Cristian
[Solved] X-axis start in date/time chart
[Solved] X-axis start in date/time chart
Last edited by MrProgrammer on Sun Sep 05, 2021 7:32 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Reason: Tagged ✓ [Solved]
LibreOffice 6.4.7.2 on Kubuntu Linux 20.04
Re: X-axis start in date/time chart
Please do upload a small file of data.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: X-axis start in date/time chart
Plot the days since birth instead of the dates.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: X-axis start in date/time chart
Here it is:FJCC wrote:Please do upload a small file of data.
I'm sorry, I'm not sure what you mean...Villeroy wrote:Plot the days since birth instead of the dates.
Cristian
LibreOffice 6.4.7.2 on Kubuntu Linux 20.04
Re: X-axis start in date/time chart
The attached file has a modified version of the plot. I used the menu Format -> Axis -> X Axis and made changes on the Numbers and the Scale tab. On the Numbers tab, I changed the formatting of the tick labels. I removed the selection from Source Format (a check box on the right side of the dialog) and selected the GG/MM/AA format. This removes the time information from the tick labels and simplifies adjusting the Scale. On the Scale tab, I turned off the automatic choice for the Maximum and Minimum and entered values by hand. Notice that Maximum and Minimum values are dates without a time element and the Major Interval is now 7 days and not 168 hours. A problem with manually setting the limits is that you will have to adjust the settings as you add data.
I also made the chart smaller just to make it easy to work with on my small screen.
What Villeroy is suggesting is plotting each cat's weight in terms of its age in days. The day it is born is day 0 (or one) and you increment by one each subsequent day. You can still record the date and time of the data. To convert that to days-since-birth, you just subtract the date of birth and format the answer as a number instead of as a date. This would probably make more sense than plotting the date because what matters is that a cat is 13 days old, not that the date happens to be August 20.
I also made the chart smaller just to make it easy to work with on my small screen.
What Villeroy is suggesting is plotting each cat's weight in terms of its age in days. The day it is born is day 0 (or one) and you increment by one each subsequent day. You can still record the date and time of the data. To convert that to days-since-birth, you just subtract the date of birth and format the answer as a number instead of as a date. This would probably make more sense than plotting the date because what matters is that a cat is 13 days old, not that the date happens to be August 20.
- Attachments
-
- Gattini Agosto 2021_fjcc.ods
- (56.45 KiB) Downloaded 130 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: X-axis start in date/time chart
I converted your input table into a flat list. In order to add new measurements, insert new rows and enter time, name and weight. The sort order can be anyway you want. I sorted the flat list randomly for demonstration purposes.
The second sheet has a pivot table with weights for each day and each kittens. A pivot table is a table derived from a flat list. The daily weights are averages for one day.
The chart is a pivot chart (not availlable in OpenOffice). It updates when you right-click>Refresh the pivot table. The x-axis displays the age in days.
The second sheet has a pivot table with weights for each day and each kittens. A pivot table is a table derived from a flat list. The daily weights are averages for one day.
The chart is a pivot chart (not availlable in OpenOffice). It updates when you right-click>Refresh the pivot table. The x-axis displays the age in days.
- Attachments
-
- Gattini_Pivot.ods
- (35.62 KiB) Downloaded 115 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: X-axis start in date/time chart
Thank you. I will experiment with this. Having to manually adjust as I add data is non optimal, but can be done. It would be nice to have a setting to manually set the lower (leftmost) limit, and leave the other end automatic...FJCC wrote:The attached file has a modified version of the plot. I used the menu Format -> Axis -> X Axis and made changes on the Numbers and the Scale tab. On the Numbers tab, I changed the formatting of the tick labels. I removed the selection from Source Format (a check box on the right side of the dialog) and selected the GG/MM/AA format. This removes the time information from the tick labels and simplifies adjusting the Scale. On the Scale tab, I turned off the automatic choice for the Maximum and Minimum and entered values by hand. Notice that Maximum and Minimum values are dates without a time element and the Major Interval is now 7 days and not 168 hours. A problem with manually setting the limits is that you will have to adjust the settings as you add data.
Actually that's not true, because we use the tables to match the weight gain/loss with therapies and such, so it is important to see on which day there was a weight gain or loss. And it is also important to have, when they are very young, several plot points per day.FJCC wrote:To convert that to days-since-birth, you just subtract the date of birth and format the answer as a number instead of as a date. This would probably make more sense than plotting the date because what matters is that a cat is 13 days old, not that the date happens to be August 20.
In the graph I posted, for example, the yellow cat got sick when he stopped gaining weight, then the vet started a therapy on a given day, and we can check how long after that the cat started gaining weight again...
Anyway, thank you both for your answers, I will experiment more with these ideas.
Cristian
LibreOffice 6.4.7.2 on Kubuntu Linux 20.04
Re: X-axis start in date/time chart
You may remove the automatic setting only on the minimum if you want to. At times, that will leave some white space on the right side of the chart.Quaxo76 wrote:It would be nice to have a setting to manually set the lower (leftmost) limit, and leave the other end automatic...
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.