Questions tagged [sgplot]
49 questions
0
votes
1 answer
How to Plot a Series of Rates Over Time in SAS
I have 3 data sets: "Complete", "Incomplete", and "Case_List". "Complete" contains records of individuals that have had a full series of a vaccine; "Incomplete" is identical except that the number of doses is less than the full series; and…

spencergadd
- 57
- 6
0
votes
1 answer
Can we use multiple symbols or color in MARKERATTRS option of SAS SGPLOT?
I want to combine Scatter and Series Graph using PROC SGPLOT. At some point I need to use different different symbols for my group data. I used Styleattrs option for this purpose. But when I try to add legend, I can not merge the symbols using…

Noob_Coder
- 3
- 2
0
votes
1 answer
SAS - Putting non-numeric values on the X-AXIS of Histogram sgplot
I have a dataset called marks and I want to use proc sgplot to get the names of the students on the x axis and the marks of a1 on the y axis. I typed in histogram name, but apparently SAS doesn't let the x axis be non-numeric. Does anyone know if…
0
votes
1 answer
How to shift side-by-side bars in Proc SGPLOT for Time Data? discreteoffset doesn't work with (type=time) option
I am currently trying to create a side-by-side dual axis bar chart in proc sgplot for the data which is based on dates. I am currently stuck at last thing, where I am not able to shift the bars using discreteoffset option on vbar, because I am using…

Rhythm
- 680
- 5
- 9
0
votes
0 answers
Order ODS Output by Variable Not in Graph
I am using ODS to output an rtf file with graphs for each warehouse, using the warehouse ID as the by value. I need to organize the graphs in ascending order of rejected products per 100 produced. I was reordering the graphs manually in Word, but…

Druscilla
- 3
- 2
0
votes
1 answer
SAS - Possible to display text using annotate at the same position whithin the graph whichever the size of legend and size of graph?
In SAS, I'm trying to set a 'fixed' position of an arrow to be displayed on a graph. I would like the arrow to be always displayed at the same position, whichever the size of the graph. For now, I'm using annotate to display the arrow, its…

AppyPoint
- 45
- 6
0
votes
1 answer
Organize ODS output by an ID
I need to create 3 graphs for each facility and output these onto 1 page. I have 600 facilities to do this for so I will have a 600 page document. I have created my graphs using the code below. If I specify a "where ID=X" in the proc sgplot…

Druscilla
- 3
- 2
0
votes
1 answer
Limiting the number of bars in a Histogram produced in SAS
I am running a proc sgplot in SAS to create a histogram. Y-axis: Number of people, X-Axis: Count of Miles. The problem is the histogram is displaying the data using 30+ bars of very small x-axis intervals. I want only 10 bars to display in the…

Jont
- 23
- 2
- 6
0
votes
1 answer
Paired bar charts in SAS
I need help creating a single bar chart, that pairs bars together (by two levels of Group), for four time periods. Here's what my table of data look like, sorted by 'Group':
I've figured out how to plot the means for both groups, but only for one…

immaprogrammingnoob
- 167
- 2
- 13
0
votes
1 answer
Default value used for Kernel density SAS
I'm using SAS to plot an histogram with the Kernel density. In the documentation, it is specified that we can choose the parameter c: "the standardized bandwidth for a number that is greater than 0 and less than or equal to 100." But I cannot find…

AppyPoint
- 45
- 6
0
votes
1 answer
How do I add frequency to each group in a scatter plot in SAS?
I am trying to add a freq count (n=) for each group in my scatter plot.
proc sgplot data= FrequencyAdd(where=(count = 6 and person = "Jim"));
scatter x=adm_dt y=Brand/ group = Brand freq=Freq_Flag;
run;
The frequency flag is always equal…
user10745594
0
votes
1 answer
SAS: Can you save the input table of a SAS generated bar-line chart?
So I am generating a SAS bar-line chart in SAS with a dataset which looks like this:
id date default var1 log_var1 square_var1 ... cubic_var1
1 1 1 5 -3.3 0.9 1.2
1 2 0 15 -9.9 2.7 3.6
2 1 …

78282219
- 85
- 1
- 8
0
votes
2 answers
SAS: Merge two plots into one by group
I have two plots that I would like to merge into one. Each plot represents the proportion of present / not-present observations by their corresponding cumulative test results for the year
So on the plot I would like to see bars, side by side for…

78282219
- 85
- 1
- 8
0
votes
1 answer
how to create individual bars in the descending order in proc sgplot?
I created the following graph using sgplot
proc sgplot data=Colordistricts;
hbar distrct/response=Percent
group= population;
run;
However, it seems that the individual population groups are arranged in alphabetical order in the graph (Asian…

Nathan123
- 763
- 5
- 18
0
votes
1 answer
proc sgplot multiple line title
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…

duckman
- 687
- 1
- 15
- 30