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!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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