How can have a title of a graph with multiple lines? I would like to have to title in the first line and then a paragraph underneath that title to explain the graph. My attempt is:
proc sgplot data= maindata.small_medium_big_firms;
title "Number of big, medium and small firms"
title1 " this is to explain the graph .........";
series x=year y=group_1/lineattrs=(color=red) legendlabel= "small";
series x=year y=group_2/lineattrs=(color=blue) legendlabel= "medium";
series x=year y=group_3/lineattrs=(color=black) legendlabel= "big";
YAXIS LABEL = 'Number of firms';
XAXIS LABEL = 'Year';
run;
Title and Title1 are the same command. By design, if you submit a new TITLE statement it overwrites any other TITLE statements of the same number and higher numbers.
This uses SASHELP data set to run, so anyone with SAS should be able to run the code correctly.
proc sgplot data= sashelp.stocks;
title1 "My Title - Title1" ;
title2 "Other Text - title2";
where stock='IBM';
series x=date y=open/lineattrs=(color=red) legendlabel= "Open";
series x=date y=close/lineattrs=(color=blue) legendlabel= "Close";
series x=date y=high/lineattrs=(color=black) legendlabel= "High";
YAXIS LABEL = 'Stock Price';
XAXIS LABEL = 'Date';
run;