BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
bohln
Calcite | Level 5

I have a columns of positive and negative values with high cardinality that are captured in sequence of one another. I would like to build a step plot the actual value (ex. 0.549, -2.9583, 0.624, -0.563) along the y axis, but have them distributed across the X axis, using the row-count as a proxy for a unit of time (I actually have many columns of this kind of data, and the numbers are captured sequentially). Is there a way to do this only the tools that exist in the SAS Visual Analytics tool?

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

General SAS plotting requires the variables to have the values beforehand. Exceptions are statistical procedures that make plots based on requested analysis.

So one you have the "order" variable added the data should be easy to plot as you just tell the tools which axis to use which value and the type of plot.

I don't have access to Visual Analytics, so I can't say what the transform has to be.

 

Your ordered pairs are written incorrectly. The X value comes first, with the Y second. If the X is supposed to be 1 then the pair should be written as (1, 0.549) . If you think in different order the plots are going to come out a bit strange, if the tools even allow them.

View solution in original post

4 REPLIES 4
ballardw
Super User

Are you actually asking how to add a "row count" to your data? You may need to provide an actual example of your data as the methods for adding such a "count" can be pretty data dependent.

bohln
Calcite | Level 5
I'd prefer to not add another column if possible, but if that is a simpler means of getting what I'm after, I'd be fine with it. However, I'm not sure how to provide an example other than the following:

for example:

row 1: 0.549
row 2: -2.9583
row 3: 0.624
row 4: -0.563

I want the four plotted data points to be (0.549, 1), (-2.9583, 2), (0.624, 3), (-0.563, 4).

visual representation: https://octave.sourceforge.io/octave/function/images/stairs_501.png

Again, if I must make a new column to capture the row counts, so I can use them as x-axis values, then that's fine. My primary question is: can this be done WITHIN the Visual Analytics tool or if I would have to swap to the Data Studio and use SAS code?
ballardw
Super User

General SAS plotting requires the variables to have the values beforehand. Exceptions are statistical procedures that make plots based on requested analysis.

So one you have the "order" variable added the data should be easy to plot as you just tell the tools which axis to use which value and the type of plot.

I don't have access to Visual Analytics, so I can't say what the transform has to be.

 

Your ordered pairs are written incorrectly. The X value comes first, with the Y second. If the X is supposed to be 1 then the pair should be written as (1, 0.549) . If you think in different order the plots are going to come out a bit strange, if the tools even allow them.

bohln
Calcite | Level 5
Yep, they definitely are. that was just an oversight and I can't see a way to edit a reply ha.

Okay, thank you for that info. Unfortunately, I can't create any calculated columns at the moment due to an environment issue, so I will just have to get that resolved before I can continue my work.

Thanks for your help.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 359 views
  • 0 likes
  • 2 in conversation