12-13-2013 08:03 AM
This is my first time at here and i have stacked a problem regarding GTL (Graphical Template language) from last couple of days.
-Major problem is that while using same formatted value (say for example: "Pos" for y-axis=0.2,1.2.. ) , BAR is overlapping on the Graph
-i have also tried with TICKVALUELIST on Y-AXIS but it seems SCATTERPLOT after BAR-CHART is not working on OVERLAY and generated warning
-For better understanding, i have given the code and output hereby
-From the attached output (test.png); you will see where Formatted Values is repeated at Y-Axis is overlapping
0.8="x 200 mg"
1.8="x 400 mg"
0.2=" 12 (4.67%)"
0.4=" 11 (8.03%)"
0.6=" 13 (23.31%)"
0.8=" 61 ( 100%)"
1.2=" 8 (5.69%)"
1.4=" 10 (26.61%)"
1.6=" 8 (76.69%)"
1.8=" 51 ( 100%)"
DEFINE STATGRAPH gtplot;
LAYOUT OVERLAY / XAXISOPTS=(label=" "
linearopts=(tickvaluesequence=(start=-5 end=0 increment=1)))
YAXISOPTS=(label="Treatment / Dose")
BARCHART y=estimate x=paramn / GROUP=paramn BARWIDTH=0.4 NAME="bar" ORIENT=horizontal
FILLATTRS=(COLOR = LIGHTGREY) DATATRANSPARENCY=0.7;
SCATTERPLOT x=estimate y=paramn / GROUP=paramn XERRORLOWER=eval(estimate-standard)
BARCHART y=estimate x=paramn1 / GROUP=paramn BARWIDTH=0.4 PRIMARY=no NAME="bar1"
FILLATTRS=(COLOR = LIGHTGREY) DATATRANSPARENCY=0.7 ;
PROC SGRENDER DATA=uni_api TEMPLATE="gtplot";
format paramn trtsdf. paramn1 trtpf.;
-Waiting for your kind Reply and thanks in advance
12-13-2013 09:38 AM
It would be better for you to post this question in the forum specifically for ODS GRAPHICS questions (which includes GTL questions). The developers who work on ODS GRAPHICS and GTL generally monitor that forum area. Here's the URL:
Or, alternately, you would open a track with Tech Support directly on this. They could look at your code and your data and help you with a resolution.
I do note that you have a semi-colon missing for your second VALUE statement in the PROC FORMAT step (before the QUIT; statement). I would also suggest that you add the FMTLIB option to your PROC FORMAT step:
PROC FORMAT FMTLIB;
...in order to verify that your format is being created correctly with the values you want.
Aside from any GTL issues, the way you define your format is NOT a multi-value or multi-label format. The second definition in your code will override the first definition. To verify format behavior separate from the GTL question (which you have to fix first), please run the program below. You can see the output that is produced in the screen shot. Format creation is not "additive" -- if the format already exists when another VALUE statement is encountered with the same name as an existing format, the new format definition replaces the original format definition with the same name. There is a way to define a multi-label format (MLF), but only certain procedures support multi-label formats and I do not know whether the ODS GRAPHICS procedures support them. That is also a question for Tech Support.
To see how to define multi-label formats, please refer to this doc:
(2nd screen shot)
ods html file='c:\temp\what_is_in_format.html' style=sasweb;
PROC FORMAT fmtlib;
proc freq data=sashelp.class;
where age le 13;
title 'What is Format Value';
format age myfmt.;
ods html close;
12-13-2013 09:55 AM
Thanks, I have posted my question to the GTL monitoring forum as per your suggestion. Actually Format was not my concern, my concern is why GTL overlapping Format values on Graph.