BookmarkSubscribeRSS Feed
SAS_AMUH
Obsidian | Level 7

I did the following programming to remove all the title, x- and y-axis labels. 

However, I would also like to remove the label above the box plots. 

Could you please help me what code I should be writing?

Also if there is any name for this type of labelling, please let me know. 

I also wonder if there is any other way to remove title (I wrote title1 " "). 

 

 

proc sgplot data=didi noautolegend;
title1 " "; 
block x=type block=type/ filltype=alternate 
         fillattrs=(color=white)altfillattrs=(color=white);
vbox IPtotal / category=type boxwidth=0.5 nooutliers;
scatter  x=type y=IPtotal / jitter transparency=0.6 
         markerattrs=(color=red symbol=CircleFilled);
yaxis offsetmax=0.1;
xaxis display = (NOLABEL NOVALUES);
yaxis display = (NOLABEL NOVALUES);

run;SGPlot35.png

 

3 REPLIES 3
ballardw
Super User

Without data it isn't really clear what you currently have.

Either write code using one of the SAS supplied data sets such as SASHELP.Class or Sashelp.cars or similar or

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

VBOX does not place any label above anything. I think you are seeing the result of your BLOCK plot. Which may mean that you want the NOVALUES option in your block plot.

 

BTW, you only want ONE Yaxis or Xaxis statement. Generally if you have two of the same axis statement only the last one is used.

SAS_AMUH
Obsidian | Level 7

 I have somehow figured out the way to delete them. Thank you very much for your helpful tips. 

DanH_sas
SAS Super FREQ

Use the NOVALUES option on the BLOCK statement to get rid of the block values.

 

Hope this helps!

Dan

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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
  • 3 replies
  • 1148 views
  • 2 likes
  • 3 in conversation