01-19-2015 02:16 AM
I would like to find out if anyone knows how to add additional borders to the datalabel in a proc sgplot. Currently i have a programme that outputs graphs to powerpoint, and the datalabelpos=bottom, this works well, however for ease of reading i would like to add additional vertical borders to the datalabel, and i have yet to find a solution to this. I have attached the images of how the graphs currently look, and how i would like them to look.
01-20-2015 01:30 PM
Can you post Code to generate current graph, especially if it were to use a SAS supplied dataset?
SAS version you are using? Many options are changing with each release.
01-20-2015 11:55 PM
Apologies for the lack of information.
I am using SAS Base 9.4 and the code below creates the graph and output.
define style styles.mossgradient;
scheme "SAS 9.4 Template" /
heading_font = ("Segoe UI Light, <MTsans-serif>, <sans-serif>" , 40 pt)
body_font = ("Segoe UI Light, <MTsans-serif>, <sans-serif>" , 20 pt);
class bodydate /vjust=bottom just=left width=50%;
class pageno /vjust=bottom just=right width=50%;
ods _all_ close;
Title " " ;
ods powerpoint file = "C:\Temp\SAS_94_ODS_Graph.pptx" style=mossgradient;
proc sgplot data =sashelp.cars pad= (left=12% right = 13.1%);
title 'This is where the title goes.';
/ response = Horsepower
group = origin
groupdisplay = cluster
grouporder = DATA
datalabel = horsepower
datalabelattrs=(family = 'Calibri' size = 8 pt)
xaxis display = (nolabel);
yaxis grid label = 'Yaxis label';
keylegend / location=outside position = bottom title = "";
footnote 'The ODS Destination for Powerpoint';
ods _all_ close;
once you run the code above you may have an idea of what it is i am looking for, thanks.
01-21-2015 11:12 AM
I'll not be able to run the code until I can get 9.4. Which is likely to take awhile.
This example may help: 35132 - Bar chart with a data table below the graph
And sometimes lines may be determined by your style. Compare output using the journal style and default for example.