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;
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.
I have somehow figured out the way to delete them. Thank you very much for your helpful tips.
Use the NOVALUES option on the BLOCK statement to get rid of the block values.
Hope this helps!
Dan
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.