BookmarkSubscribeRSS Feed
Fluorite | Level 6

SAS 9.4 - I have a data table that I am trying to visualize.  The x-axis is a DateTime field.  The table contains aggregate data with two sets from different dates.  When I attempt to plot the series using a category variable, the two series are spread far apart, they appear too zoomed out.  


The dates of the sets are three days apart, and I can see on the x-axis there is a tick for every 12 hours, but the values for the y-axis are per second.  Meaning each second there is a y value but only for about a 20 minute stretch.


As you can see in the screenshot the plots are so small you can't really see them.


How can I fix this so that you can see both series up close and not so small and spread apart? Please know that I can provide more information if needed.



Super User

When x values don't overlap any graph will have a similar behavior. this is aggrevated a bit by the relatively large numeric values involved with datetime values and the SAS default axis generator


Are you attempting to compare time of day behavior on different days? If so I suggest modifying your data to have a time variable: TV= timepart(datetimevariablename) in a data step and plot that with your category variable as a group. Or some sort of scale shift.

Another option might be to use a sgpanel, panel by the category variable, columns=1 and use uniscale=Row to allow the x axis values to display differently in each panel.


Your comparing to two datetimes with a gap of a couple days is similar to the behavior you would get if you plotted data from a few dates a coupls centuries apart. So some sort of rescaling is like needed to make a useable



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation