BookmarkSubscribeRSS Feed
BC33
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.

 

-Thanks!


sas-problem.PNG
2 REPLIES 2
ballardw
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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1073 views
  • 0 likes
  • 3 in conversation