BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Yura2301
Quartz | Level 8

Hi all,

Will be very appreciate if someone help with deleteing background that takes half of screen, long story short - the code looks like:

Yura2301_0-1643280470925.png

And in the end the graph/tree drows as it shoulld but much below then title, I specially marked that area in green to make it visible:), so in the end graph looks like:

Yura2301_1-1643280613240.png

So shortly  - I would like that green area disappear at all so graph will move up and will be drawn right after the title, like it's in case of usual proc report or proc print.

 

Thanks in adwanced for any help! 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

These two options are in conflict, I think.

ods graphics / reset width=38.5cm height=50.8cm imagename="tst"
  attrpriority=none noborder;

And

proc sgplot data=Input noautolegend aspect=1;

aspect=1 indicates you want a square plot area, but your image canvas is 38.5x50.8cm. Remove the aspect option and the plot will fill the canvas better.

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

It's easier to experiment with your use case if you post actual code instead of a screenshot. 

 

One thing to try: add the GTITLE option to your ODS output destination. This will make the title part of the graphical image instead of text outside of it. In SAS Enterprise Guide you can do this in code, assuming you're using HTML output:

/* EG v 8 using HTML5 */
ods html5(id=eghtml) gtitle;
/* or for EG 7 where HTML is used */
ods html(id=eghtml) gtitle;

 You can also set this preference in Tools->Options: Results. You can do the same for footnotes with GTFOOTNOTE.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
Yura2301
Quartz | Level 8

Hi again Chris:)!

Thanks for your advices, tried everything - but ugly green background still on it place:)

 

The code(but please just change gpath option value ) :

 

proc sql;

create table WORK.Input

  (  

             LinkId num,

             NodeId num,

             Xn num,

             Yn num, 

             Xl num,

             Yl num,

             TxtLable char(100)

  );

 

  insert into Input values(1,1,1,9,1,9,'TST');

quit;

 

ods graphics / reset width=38.5cm height=50.8cm imagename="tst"

              attrpriority=none noborder;

                   ODS LISTING gpath='...path to output image';

          title 'Treee';

 

          proc sgplot data=Input noautolegend aspect=1;

            styleattrs backcolor=green;

            series  x=xl y=yl / group=LinkId attrid = yl lineattrs=(Pattern=solid ) arrowheadshape=barbed arrowheadpos=end;

            scatter x=xn y=yn / group=Yn

                                                                    markerattrs=(symbol=circlefilled size=1.5mm)

                                  filledoutlinedmarkers markerfillattrs=(color=black) markeroutlineattrs=(thickness=6)

                    dataskin=sheen datalabel=TxtLable datalabelpos=topright DATALABELATTRS=(Color=black Size=7);

            xaxis min=0 max=10 display=none;

            yaxis min=0 max=10 display=none;

          run;

          ods LISTING close;

 

Thanks one more time.

ChrisHemedinger
Community Manager

These two options are in conflict, I think.

ods graphics / reset width=38.5cm height=50.8cm imagename="tst"
  attrpriority=none noborder;

And

proc sgplot data=Input noautolegend aspect=1;

aspect=1 indicates you want a square plot area, but your image canvas is 38.5x50.8cm. Remove the aspect option and the plot will fill the canvas better.

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
Yura2301
Quartz | Level 8

Hi again Chris,

The issue is fixed, perfect!:)

 

Many thanks!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 4 replies
  • 503 views
  • 2 likes
  • 2 in conversation