SAS Viya

SAS Viya’s AI-based automation aligns to the needs and talents of your team, keeping both models and progress in motion across the analytics life cycle.
BookmarkSubscribeRSS Feed
HansSteenhuis
Calcite | Level 5

does this graph also exist in SAS VIYA? Or can I make it myself?

 

On the x line I need the dates. On each day there are several points of the starting times.

 

I'm using the scatter chart now, but how can I get that linear line?

 

see example how it should be

 

grafiek_icm.JPG

7 REPLIES 7
BrunoMueller
SAS Super FREQ

Are you referring to SAS Visual analytics or some SAS program using Proc SGPLOT?

HansSteenhuis
Calcite | Level 5

I'm refering to SAS Viya

BrunoMueller
SAS Super FREQ
Are you using SAS visual Analytics to create the graph (all point and click) or are you writing a SAS program?

HansSteenhuis
Calcite | Level 5

Yes i'm using SAS Viya to create the graph

BrunoMueller
SAS Super FREQ

SAS Viya as answer does not help much. 

 

To create the graph are you using code like this:

proc sgplot data=sashelp.stocks;
  where
    stock = "IBM"
    and year(date) between 2004 and 2006
  ;
  scatter x=date y=close / ;
  reg x=date y=close / ;
run;

Creating this

Bruno_SAS_0-1679579175818.png

Or another way?

 

HansSteenhuis
Calcite | Level 5

Oh I'm using SAS visual Analytics to create the graph (all point and click)

BrunoMueller
SAS Super FREQ

In SAS Visual Analytics, the Scatter plot supports a "Fit Line", use either the right mouse button or the options pane to add it.

See https://documentation.sas.com/doc/en/vacdc/default/vaobj/n02h2a3i8htlhln1o4ngyz6f1ox5.htm#p0bvwvf3yy... for more details 

 

However the Scatter plot only supports measures. So currently there is no point and click way of creating such a graph using a measure and a date.

 

You could use the TreatAs operator to convert the date to a measure and then use it in the scatter plot, but you will loose the date information, but you would see the data points as well as the fit line.

 

Then there is always the Data Driven Content object that will allow to use for instance D3.js to do something like this or run some SAS code and generate a graph.

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Discussion stats
  • 7 replies
  • 2048 views
  • 0 likes
  • 2 in conversation