BookmarkSubscribeRSS Feed
acordes
Rhodochrosite | Level 12

When I use the sgplot procedure in sas viya and get a lot of graphs generated due to a "by" statement for example, the output will open in a new browser tab.

That's convenient because I can save as a html page by right-click. This preserves mouseover feature and so on. 

 

But when I have few graphs output, they are displayed within the sas studio window and the option to save as html vanishes. I can only save each individual plot but it's not tip-able anymore. 

 

How can I force ods to output always in a new brower tab?

 

I attach the code of sgplot without data. I suppose a response here does not require a working example. 

 


ods graphics on / width=20cm;
proc sgplot data=CASUSER.want1 ;
/* by _CLUSTER_ID_; */
format diff_venta _o_opcionales_valor euro9.0;
by  cluster_description;
band y=diff_venta lower=-5000 upper= 0 / fillattrs=(color = lightgrey transparency=0.9);
ellipse y=diff_venta x=_o_opcionales_valor /  fill fillattrs=(transparency=0.8 color=liy);
reg y=diff_venta x=_o_opcionales_valor /  nomarkers lineattrs=(color=lightred); 
/* reg y=diff_venta x=_o_opcionales_valor / degree=2 nomarkers lineattrs=(color=orange) transparency=0.5;  */
text y=diff_venta x=diff_venta text=txt / textattrs=(size=12 color=firebrick) ;
scatter y=diff_venta x=_o_opcionales_valor / group=model dataskin=sheen markerattrs=(symbol=plus size=7) 
tip=(_o_opcionales_valor valor_venta_reparado _o_pff _o_actual_mileage meses_efectivos ) ;

/*    inset "Intercept = &Int" "Slope = &Slope" /  */
/*          border title="Parameter Estimates" position=topleft; */
xaxis grid;
yaxis grid;
/* xaxis values=(-5000 to 10000 by 5000); */
lineparm x=0 y=0 slope=1 / lineattrs=(color=lib pattern=4 thickness=2);
run;

pic2.pngpic1.png

 

 

 

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 0 replies
  • 172 views
  • 0 likes
  • 1 in conversation