BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
dsam
Fluorite | Level 6
Like the annotation in my graph that I shared in my pic is placed on top of the bar instead of end of where the bar ends in your plot
Ksharp
Super User
POST YOUR REAL/MASKED DATA.
Ksharp
Super User

You want this ?

As I said post REAL or MASKED data, so I can test where is the problem.

Otherwise, you should resort to yourself.

 


data have;
infile cards expandtabs truncover;
input Sor :$20.	scrndosn	hardosn	encdosn	(group2	chall label) (:$20.);
_scrndosn=scrndosn-.2*scrndosn;
_hardosn=hardosn-.2*hardosn;
_encdosn=encdosn-.2*encdosn;
cards;
101/HDM	30	100	300	HDM	cake
102/LDM	3	300	10	LDM	cupcake  *
102/LDM	600	2000	2000	LDM	cake  *
102/LDM	1000	4000	1000	LDM	soda *
103/PDM	600	2000	4000	PDM	soda
103/PLM	100	100	100	PLM	cake  *
104/PDM	100	100	1000	PDM	water *
;
proc format;
picture fmt
low-high='00009mg';
run;
ods graphics /width=10in height=6in;
proc sgpanel data=have nocycleattrs noautolegend ;
panelby group2/layout=rowlattice  novarname onepanel proportional uniscale=column NOHEADERBORDER HEADERBACKCOLOR=white;
hbarparm category=Sor response=encdosn/group=chall fillpattern nofill groupdisplay=cluster fillpatternattrs=(pattern=l1) baseline=1  ;
text y=Sor x=_encdosn text=label/group=chall groupdisplay=cluster strip contributeoffsets=none textattrs=(size=20 color=black);

hbarparm category=Sor response=hardosn/group=chall fillpattern nofill groupdisplay=cluster fillpatternattrs=(pattern=r1) baseline=1;
text y=Sor x=_hardosn text=label/group=chall groupdisplay=cluster strip contributeoffsets=none textattrs=(size=20 color=black);

hbarparm category=Sor response=scrndosn/group=chall groupdisplay=cluster baseline=1 ;
text y=Sor x=_scrndosn text=label/group=chall groupdisplay=cluster strip contributeoffsets=none textattrs=(size=20 color=black);

rowaxis display=(nolabel) discreteorder=data;
colaxis display=(nolabel) type=log  integer valuesformat=fmt.  offsetmax=0.03
 values=(1, 3, 10, 30, 100, 300, 600, 1000, 2000, 4000) ;
refline 600/axis=x ;
run;

Ksharp_0-1692879990430.png

 

dsam
Fluorite | Level 6
I changed this code just a bit with the formatted values and it is working fine now! Thank you again , you are always so helpful!
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 18 replies
  • 5993 views
  • 0 likes
  • 4 in conversation