BookmarkSubscribeRSS Feed
Minki
Calcite | Level 5

With the following (example) code a picture is created which looks fine if using IMAGE_DPI=100 in the ODS LISTING (see graph1.pdf). But if using IMAGE_DPI=1200 (what is needed by customer) the symbols are displayed in a very light shade (nearly invisible) which could not be acceptable (see graph2.pdf). Any ideas how to solve this? Thanks for any ideas or hints!

SAS code:

 

data test;

  input avg diff sgrpdc count_score;

  cards;

2 0 1 1

5 -1 1 1

12 2.5 1 2

18 1.2 1 1

20 -3 1 3

20 -1 1 1

23 3.5 1 2

25 -4 1 1

27 2.1 1 2

33 0.4 1 4

3 1.1 2 1

6 -1 2 2

12 0.5 2 1

15 -1.2 2 2

18 -3 2 1

20 -1 2 1

24 0.5 2 1

26 -4 2 1

 ;

run;

 

proc template;

  define style styles.mypng;

  parent=styles.listing;

  style GraphData1 from GraphData1 / color=black contrastcolor=black linestyle=1

        markersymbol='plus';

  style GraphData2 from GraphData2 / color=black contrastcolor=black linestyle=1

        markersymbol='circle';

  style GraphOutlines from GraphOutlines / color=black contrastcolor=black linestyle=1                 
               linethickness=4pt;

  end;

  define statgraph sgdesign;

  begingraph;

    entrytitle "Score for Cystic Fibrosis and COPD subjects p=0.xxxx";

      layout overlay / yaxisopts=(label="Within Subject Difference (V2 - V1)#in score"

         labelattrs=(size=8) labelfitpolicy=splitalways labelsplitchar='#' labelsplitchardrop=true

         linearopts=(viewmin=-6 viewmax=8 minorticks=true

         minortickcount=4 tickvaluesequence=(start=-6 end=8 increment=2)))

         xaxisopts=(label="Within Subject Average (V1 and V2) in Score"

         labelattrs=(size=8) linearopts=(viewmin=0 viewmax=40

         tickvaluesequence=(start=0 end=40 increment=10)));

      scatterplot x=avg y=diff / group=sgrpdc

                 name='scatter' markersizeresponse=count_score;

      referenceline y=1 / lineattrs=(color=black) curvelabel="Mean:mw" curvelabelposition=max

               curvelabellocation=outside curvelabelsplitchar='#' curvelabelsplitchardrop=true

               curvelabelsplit=true curvelabelattrs=(color=black size=6);

      referenceline y=3 / lineattrs=(color=black pattern=shortdash) curvelabel="+1.96SD:sd"

               curvelabelposition=max curvelabellocation=outside curvelabelsplitchar='#'

               curvelabelsplitchardrop=true curvelabelsplit=true curvelabelattrs=(color=black size=6);

      referenceline y=-2 / lineattrs=(color=black pattern=shortdash) curvelabel="-1.96SD:#sd"

               curvelabelposition=max curvelabellocation=outside curvelabelsplitchar='#'

               curvelabelsplitchardrop=true curvelabelsplit=true curvelabelattrs=(color=black size=6);

      discretelegend 'scatter' / opaque=false border=true halign=right valign=bottom   
               displayclipped=true across=1 order=rowmajor location=inside;

    endlayout;

  endgraph;

  end;

run;

 

ods listing image_dpi=1200 gpath="c:\temp" style=mypng;

ods graphics on / reset=all imagename="test1" imagefmt=png width=690px height=480px noborder;

 

proc sgrender data=test template=sgdesign;

run;

quit;

 

ods listing close;

ods graphics off;

 

1 REPLY 1
Damo
SAS Employee

Hi @Minki

 

I can reproduce the behaviour you reported on my side but unfortunately I did not find a solution for you (using weight=bold, etc.).

You may want to discuss that one with your SAS Technical Support.

 

Sorry Smiley Sad

 

Cheers,
Damo

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 660 views
  • 0 likes
  • 2 in conversation