Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Scatterplot in Numbers - how to work with dates on x-axis?

I'm stumped - is it even possible to edit and display the tick marks on the x-axis of a scatter plot when I'm using dates? I'd like the graph to show the actual dates (from my spreadsheet) on the x-axis, and also have them spaced chronologically corresponding to the Y-axis values that are plotted. That is, I'm plotting a numeric value (for medical data) as the Y-axis and looking at changes across time; I don't have a value for every single month, rather there may be 2-4 per year. And while Numbers will plot the data points that way (unevenly spaced across the graph) it selects dates evenly spaced across the x axis; other than my actual first and last entry, the dates Numbers generates for the x-axis don't line up with nor correspond to the actual value (date) the data were taken. I hope this question made sense to someone!

MacBook Air 13″, macOS 10.15

Posted on May 27, 2021 2:07 PM

Reply
Question marked as Top-ranking reply

Posted on May 27, 2021 4:42 PM

You can make a second chart to generate just the X axis labels if you want them to all be Jan 1. It will be a regular line chart with no actual data in it.



Plot columns A&B as a line chart. Turn off all features of the chart other than the X axis labels. You can do diagonal labels but vertical labels are easier to line up with the other chart.


On the original chart, set the min to 1/1/21, max to 1/1/23, and steps to 22. The axis labels should all be 1/1/yy or 12/31/yy. Now turn off the X axis labels. Slide this new chart over the X axis and align/resize to match them up. Below is what it should look like (forget about my two stupid data points, focus on the X axis). The resulting chart is not exactly accurate because it is mislabelling some of the X values but there are not enough pixels to plot every day precisely anyway.



Similar questions

8 replies
Question marked as Top-ranking reply

May 27, 2021 4:42 PM in response to Gardenhoe

You can make a second chart to generate just the X axis labels if you want them to all be Jan 1. It will be a regular line chart with no actual data in it.



Plot columns A&B as a line chart. Turn off all features of the chart other than the X axis labels. You can do diagonal labels but vertical labels are easier to line up with the other chart.


On the original chart, set the min to 1/1/21, max to 1/1/23, and steps to 22. The axis labels should all be 1/1/yy or 12/31/yy. Now turn off the X axis labels. Slide this new chart over the X axis and align/resize to match them up. Below is what it should look like (forget about my two stupid data points, focus on the X axis). The resulting chart is not exactly accurate because it is mislabelling some of the X values but there are not enough pixels to plot every day precisely anyway.



May 27, 2021 2:25 PM in response to Gardenhoe

The axis of a typical true X-Y graph (scatter plot) has evenly spaced values at the grid lines or tick marks. This is true for the Y axis and X axis.


Your data should plot at the correct value in the X direction with the correct value in the Y direction. It sounds like you are saying it is not and that would be strange.


I think a screenshot showing your data and your chart would help us understand, and hopefully solve, the problem.

May 27, 2021 2:58 PM in response to Gardenhoe

Hi Gardenhoe,


The separation of labels on both axes are set automatically by Numbers using the MIN and MAX values on that axis and a changeable number of fixed intervals.


The only way to ensure that the actual date of each entry is marked on the date axis is to set the number of intervals to show every date, which, unless you are using multiple screens or have a VERY large screen, is impractical, to say the least.


You see 'irregular' dates in your chart because the 'regular' interval appears, from the first two examples, to have been set to 368 days—the closest fit that will fit.


The user has some control of the number of intervals to set for the vertical axis, which I usually use to set to an interval that will give integer values, or multiples of 10, if possible. I don't recall coming across such a control for the dates on the y axis when responding to a similar question today.


Something to consider—what is the purpose of the chart? Is it to show clearly the individual pairs (that are already listed precisely in the table, or is it to give a better picture of the changes in these values over a period of time—a function that your example does well.


Regards,

Barry

May 27, 2021 4:20 PM in response to Gardenhoe

Getting date values on the X axis to be exactly "one year" apart is not possible in every case. It is separating the values by an equal number of days, not a "year". Some years are 365, some are leap years with 366. Even if you set the min and max and steps to be perfectly "one year", it will switch off between 12/31 and 1/1 every 4 years.


I wish Numbers would have a setting or recognize that the intent is to have it display the same day of each year (or the same day of each month). Use Numbers/Provide Numbers Feedback if you want to provide that idea to them. I thought Excel was able to do it that way but I am running into the same problem there, exactly the same.

Scatterplot in Numbers - how to work with dates on x-axis?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.