Desktop productivity for business analysts and programmers

Why Won't Scatter Plots Print

Accepted Solution Solved
Reply
Contributor
Posts: 64
Accepted Solution

Why Won't Scatter Plots Print

I have a rather complicated program that I run, it will iterate through a list of variables and do certain things...

 

One of those things I want to do, is create a scatterplot, so when I'm all done I can open up my HTML results and see a whole list of scatterplots that it created.

 

For some reason, my code works fine but the scatterplots never appear. In fact I get no HTML results whatsoever (the default in my case)

options source NOnotes NOserror;

%macro plotting(datasetname,xvar,yvar);
	proc sgscatter data=&datasetname);
	  title "&xvar versus &yvar";
	  plot (&xvar)*(&yvar)
	       / pbspline;
	run;
%mend plotting;


%macro main;
* do stuff;
   %plotting(&datasetname,&xvar,&yvar);
%mend main;

 


Accepted Solutions
Solution
‎03-04-2016 07:46 PM
Grand Advisor
Posts: 10,262

Re: Why Won't Scatter Plots Print

If you run the plot code, not the macro, do you get results?

 

Is anything in the macro directing where your output goes? If you have an ODS HTML statement you might need to watch where the ODS HTML Close statement is.

 

If you look in your default results folder do you have a bunch of PNG files corresponding to the graph calls?

 

If you did something with options regarding the imagefmt that might be an issue with some forms of graphs and options, activex and java both having limits.

 

Otherwise you may have to turn on OPTIONS MPRINT and look closer at the log for details.

View solution in original post


All Replies
Solution
‎03-04-2016 07:46 PM
Grand Advisor
Posts: 10,262

Re: Why Won't Scatter Plots Print

If you run the plot code, not the macro, do you get results?

 

Is anything in the macro directing where your output goes? If you have an ODS HTML statement you might need to watch where the ODS HTML Close statement is.

 

If you look in your default results folder do you have a bunch of PNG files corresponding to the graph calls?

 

If you did something with options regarding the imagefmt that might be an issue with some forms of graphs and options, activex and java both having limits.

 

Otherwise you may have to turn on OPTIONS MPRINT and look closer at the log for details.

Contributor
Posts: 64

Re: Why Won't Scatter Plots Print

Yeah, if I run the code alone, it prints right to the HTML output tab in E.G. 

 

I also searched for ods statements in the program and there are none. I attempted to wrap the macro in ods HTML file=   and ods close; but still nothing.

 

I'll turn on MPRINT and see if there are any clues...

Contributor
Posts: 64

Re: Why Won't Scatter Plots Print

 

THANKS! 

 

Mprint showed the issue -  it was a silly extraneous character being inserted into the value for xvar from a prior process. Your tip saved me my sanity. Thanks!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 305 views
  • 0 likes
  • 2 in conversation