08-01-2024
davehalltwp
Quartz | Level 8
Member since
11-02-2017
- 80 Posts
- 39 Likes Given
- 4 Solutions
- 14 Likes Received
-
Latest posts by davehalltwp
Subject Views Posted 894 07-29-2024 02:55 PM 953 07-29-2024 02:04 PM 1362 02-29-2024 01:15 PM 1585 02-28-2024 09:28 AM 1822 11-29-2023 10:39 AM 1930 11-28-2023 04:35 PM 3276 09-21-2023 09:49 AM 3305 09-21-2023 08:59 AM 3471 09-20-2023 08:41 PM 1261 08-15-2023 07:00 PM -
Activity Feed for davehalltwp
- Posted Re: Scatter Plot, Different Symbols for Discrete X Axis Categories on Graphics Programming. 07-29-2024 02:55 PM
- Liked Re: Scatter Plot, Different Symbols for Discrete X Axis Categories for DanH_sas. 07-29-2024 02:55 PM
- Liked Re: Scatter Plot, Different Symbols for Discrete X Axis Categories for PaigeMiller. 07-29-2024 02:55 PM
- Posted Scatter Plot, Different Symbols for Discrete X Axis Categories on Graphics Programming. 07-29-2024 02:04 PM
- Liked Re: General Question about ODS Layout for RTF files for himself. 03-06-2024 09:06 AM
- Liked Re: Changing character sex variable to numeric for Kurt_Bremser. 02-29-2024 03:54 PM
- Got a Like for Re: Extracting Date Elements. 02-29-2024 02:45 PM
- Posted Re: Extracting Date Elements on New SAS User. 02-29-2024 01:15 PM
- Posted General Question about ODS Layout for RTF files on ODS and Base Reporting. 02-28-2024 09:28 AM
- Posted Re: Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST on SAS Programming. 11-29-2023 10:39 AM
- Posted Capturing 95% CI Limits (so CI bands can be plotted) from PROC LIFETEST on SAS Programming. 11-28-2023 04:35 PM
- Posted Re: Standard Error Bars on a Histogram? on Graphics Programming. 09-21-2023 09:49 AM
- Liked Re: Standard Error Bars on a Histogram? for DanH_sas. 09-21-2023 09:49 AM
- Liked Re: Standard Error Bars on a Histogram? for Ksharp. 09-21-2023 09:49 AM
- Liked Re: Standard Error Bars on a Histogram? for Rick_SAS. 09-21-2023 09:49 AM
- Liked Re: Standard Error Bars on a Histogram? for ballardw. 09-21-2023 09:49 AM
- Liked Re: Standard Error Bars on a Histogram? for DanH_sas. 09-21-2023 09:49 AM
- Posted Re: Standard Error Bars on a Histogram? on Graphics Programming. 09-21-2023 08:59 AM
- Posted Standard Error Bars on a Histogram? on Graphics Programming. 09-20-2023 08:41 PM
- Liked Re: SGPLOT, two Different Ranges on Y Axis, with different Scales for Each for ballardw. 08-15-2023 07:49 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 3 2 1 3 -
My Liked Posts
Subject Likes Posted 1 02-29-2024 01:15 PM 2 08-15-2023 05:44 PM 1 02-09-2022 04:18 PM 1 01-31-2022 08:23 PM 2 01-10-2022 05:58 PM
07-29-2024
02:55 PM
Thank you, Paige. Much better now. Dan, thank you as well. It turned out that I had commented out the ODS GRAPHICS line, which didn't have the ATTRPRIORITY setting anyway. As usual, I've learned from you all...
... View more
07-29-2024
02:04 PM
I'm doing a scatter plot with only two discrete categories on the X axis. I would like to use two different symbols for each category. I'm used to using a different symbol per third grouping, such as sex, but how can I use a different symbol per category? It seems too simple to do, ha ha. Here's what I want it to look like:
... View more
02-29-2024
01:15 PM
1 Like
Hi. Is the date value in the imported dataset a numeric SAS date value, or a character string? It's easy either way, though. if character (assuming this is YYYY-MM-DD; otherwise, just flip the numbers around accordingly): M = SUBSTR(DATEVAL,6,2) ; /* extract characters 6-7 */ D = SUBSTR(DATEVAL,9,2); /* extract characters 9-10 */ Y = SUBSTR(DATEVAL,1,4); /* extract characters 1-4 */ (and these could be converted to numeric values if needed). If DATEVAL is a (formatted) numeric SAS date, there are functions to return date components as numeric values: D = DAY(DATEVAL); M = MONTH(DATEVAL); Y = YEAR(DATEVAL);
... View more
02-28-2024
09:28 AM
I've recently been creating graphics in PDF output using ODS Layout statements to arrange and size multiple plots on a page. It seems that this can't be done so easily when writing to RTF. I would like to confirm (because maybe I am coming across ancient commentary on the internet) that Absolute ODS Layout, and in fact many of the features I used when writing to PDF, are not supported/available when writing to RTF. Am I correct about that? Thank you...
... View more
11-29-2023
10:39 AM
Thanks everybody. I learned stuff from every response!
... View more
11-28-2023
04:35 PM
Greetings, I am using PROC LIFETEST to calculate values for a KM plot, and then using PROC SGPLOT to plot the curves. Is there a way to use PDS OUTPUT to capture the CI band values that are shown in this plot that is output directly from LIFETEST? Here is my code (as you can see, I've been trying to see what output dataset they might be routed to): ods output CensoredSummary = cs
Means = mean
quartiles = quart;
ods trace on;
proc lifetest data = acmort0 alphaqt = 0.05 plots = survival (cb atrisk = 0 to 30 by 3);
time aval * cnsr(1);
strata cvhgrpn / notest;
run; Here is the plot created by LIFETEST, which includes the confidence bands: Is there any way to capture the band values so I can plot them myself via SGPLOT? I realize that it's possible to customize the plot created by PROC LIFETEST (a "Warren Kuhfeld special"), but the program I inherited doesn't do it that way and I don't want to disturb it at this point in our project timeline. Thank you!
... View more
09-21-2023
08:59 AM
Hi Rick, I had a lot of success with this just now. I'm getting my SE bars, and still have the DATALABEL at the top. (I just need to find the syntax to set the error bars black in this situation; it seems different than other situations in which I've done that). Unfortunately, without the "GROUP=" , I am no longer getting the two different colors for the two groups. But if I add "GROUP =", the error bars go away. Ugh, I need to do something else for a living. Thank you... (current code) proc sgplot data = /*adcv4*/ adcv0 noautolegend;
where paramcd = 'LVMASSIX';
vbar tx / response = pchg stat = mean limitstat = stderr
datalabel = txtext datalabelpos=top
datalabelattrs = (color=black family="courier new" size=11 weight=bold)
filltype=solid outlineattrs=(color='black');
styleattrs datacolors = (viypk vligb);
xaxis label = ' '
display = (noticks novalues)
offsetmin = .3 offsetmax = .3;
yaxis label = 'Mean Percent'
labelattrs = (family = "courier new" size = 10 pt color = black weight = bold)
values = (-4 to 12 by 2);
run; (current output)
... View more
09-20-2023
08:41 PM
Somebody wants standard error bars added to a histogram. I am hoping just to modify my PROC SGPLOT to add. I thought it would be simple -- just add yerrorlower= yerrorupper = after the slash on the VBAR statement. But apparently VBAR doesn't like those. Then I tried a separate SCATTER statement with the error bars. But again, I got this red error message: ERROR: Attempting to overlay incompatible plot or chart types. So, can I do a histogram with these bars? I see pictures of them, so I know the idea isn't insane: Any ideas? Thank you. Here is my code (with the failed SCATTER statement left in. prior to that I tried yerrorlower= yerrowupper= after the slash on the VBAR statement). proc sgplot data = adcv4 noautolegend;
where paramcd = 'LVMASSIX';
vbar tx / group = tx
datalabel = txtext
datalabelpos=top
datalabelattrs = (color=black family="courier new" size=11 weight=bold)
filltype=solid outlineattrs=(color='black') response=meanchg;
scatter x=tx y=meanchg / yerrorlower=lower
yerrorupper=upper;
styleattrs datacolors=(viypk vligb);
xaxis label = ' '
display = (noticks novalues)
offsetmin = .3 offsetmax = .3;
yaxis label = 'Mean Percent'
labelattrs = (family = "courier new" size = 10 pt color = black weight = bold)
values = (-2 to 8 by 2);
run;
... View more
08-15-2023
07:00 PM
Thank you, Mr. Ballard. I will think about that and give it a shot. Yeah, I know what you mean about not really having enough "spread" in the values to give us a reason to do this. I just asked the requestors about that a few minutes ago. Thank you again, you always come through for me..
... View more
08-15-2023
05:44 PM
2 Likes
I am doing a scatter plot on which most of the values are in a narrow lower band on the X axis. I would like to show that lower, narrow band (with its dense data points) at a more focused scale (i.e., wider data points on Y axis), while compressing the rest of the Y axis since there's not as much there. It looks like this now: I would like that narrow lower section to be tall, and the upper section correspondingly short. Is that doable? Otherwise there's really no point for me to split it at all. Here is my current code: proc sgplot data = fpepc0 dattrmap = atmap;
scatter x = pclog y = fpe / name = "scatter1"
group = avisitn groupdisplay = cluster
attrid = atrid;
xaxis label = 'Log, Plasma Concentration (ng/mL)'
labelattrs = (family = "courier new" size = 9.9 pt color = black weight = bold)
offsetmin = .04
offsetmax = .04;
yaxis label = 'FPE Rate Constant (1/min)'
ranges = (0 - 0.010 0.011-0.125)
labelattrs = (family = "courier new" size = 9.9 pt color = black weight = bold);
format avisitn visf. ;
run; Thank you, experts...
... View more
05-31-2023
10:08 PM
Thank you, Dan, solved both problemas...
... View more
05-31-2023
06:15 PM
I think you can just specify with "VALUES = " on your YAXIS statement so it will display 0-100 even though all you values will be down on one end. proc sgplot data = adttr4;
.
.
.
** ----------------------------- Axes ----------------------------- **;
.
.
yaxis values = (0 to 100 by 5)
label = 'Mean Serum TTR (mg/dL) +/- 1 Standard Error'
labelattrs = (family = "courier new" size = 9.9 pt color = black weight = bold);
... View more
05-31-2023
02:21 PM
Hi Ballardw. Yeah, I tried Keylegend /sortorder=Ascending; before. It still sorts it according to the formatted value. I will keep digging. Thank you.
... View more
05-31-2023
11:43 AM
Thank you in advance. I am trying to force the items in my scatter plot to legend to appear in a certain order (by numeric visit number, but labeled via a format). So far I can only get them to appear alphabetically, for some reason. (Also, not sure why SAS is using the same symbol for multiple visits). Here is my code: proc format;
value visf 1 = 'Baseline'
28 = 'Day 28'
91 = 'Month 3'
183 = 'Month 6'
274 = 'Month 9'
365 = 'Month 12'
457 = 'Month 15'
548 = 'Month 18'
639 = 'Month 21'
731 = 'Month 24'
822 = 'Month 27'
913 = 'Month 30';
run;
proc sgplot data = ttrpc0;
scatter x = pc y = ttr / name = "scatter1"
group = avisitn groupdisplay = cluster
markerattrs=(color=black);
xaxis label = 'Plasma AG10 Concentration (ng/mL)'
labelattrs = (family = "courier new" size = 9.9 pt color = black weight = bold)
offsetmin = .04
offsetmax = .04;
yaxis label = 'Serum TTR (mg/dL)'
labelattrs = (family = "courier new" size = 9.9 pt color = black weight = bold);
format avisitn visf. ;
run; And here is what the plot currently looks like (a bit busy, but this is what "they" want): Any ideas from you experts? If nothing else I thought I could create a custom legend, but before that I would need to resolve the distinct-symbol-per-visit issue. And I don't feel like that should be necessary; I'm not really doing anything sophisticated here. Thank you very much...
... View more