BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Daisy2
Obsidian | Level 7

I'm creating a plot but can't figure out how to remove the horizontal and vertical gridlines in this plot (marked by the red arrows).  Any suggestions?  Thanks.

Here's my code & pic.

/*Graphs and info of 2way Models*/
proc sgplot data=predpN_mm_bt;
  title "Predicted vs Actual Graph of 2way Model";
  scatter x=pred_btpN_mm y=pN;
  lineparm x=0 y=0 slope=1 / legendlabel="1:1 line"; /** intercept, slope **/
  yaxis grid values=(0.4 to 1.4 by 0.2) label="Measured pN (%)";
  xaxis grid values=(0.4 to 1.4 by 0.2) label="Predicted pN Ground Reference (%)";
run;

Daisy2_0-1609178130404.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Daisy2,

 

To remove all grid lines, just delete the keyword "grid" from the XAXIS and YAXIS statement (which requests grid lines).

 

To remove only selected grid lines, I would probably switch to reference lines.

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hello @Daisy2,

 

To remove all grid lines, just delete the keyword "grid" from the XAXIS and YAXIS statement (which requests grid lines).

 

To remove only selected grid lines, I would probably switch to reference lines.

Daisy2
Obsidian | Level 7
Thanks a bunch!! It worked.
georgel
Quartz | Level 8
/*Graphs and info of 2way Models*/
proc sgplot data=predpN_mm_bt;
  title "Predicted vs Actual Graph of 2way Model";
  scatter x=pred_btpN_mm y=pN;
  lineparm x=0 y=0 slope=1 / legendlabel="1:1 line"; /** intercept, slope **/
  yaxis  values=(0.4 to 1.4 by 0.2) label="Measured pN (%)";
  xaxis values=(0.4 to 1.4 by 0.2) label="Predicted pN Ground Reference (%)";
run;

Just remove the grids. That 's all!!!!!!

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 8899 views
  • 5 likes
  • 3 in conversation