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

Can someone help me understand why I am not getting a break in my data where there is missing data? The upper left panel should have 5 missing values (i.e., 5 broken lines) at 2nd x-axis tick (which happens to be presently labeled '2').

 

 

SGPanel.png

 

Here is the log.

 

NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M5)
      Licensed to WASHINGTON STATE UNIVERSITY - SFA - T&R, Site 70084219.
NOTE: This session is executing on the X64_7PRO  platform.



NOTE: Updated analytical products:

      SAS/STAT 14.3
      SAS/ETS 14.3
      SAS/OR 14.3
      SAS/IML 14.3
      SAS/QC 14.3

NOTE: Additional host information:

 X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

NOTE: SAS initialization used:
      real time           1.23 seconds
      cpu time            0.45 seconds

1    proc sgpanel data=sasuser.logpr noautolegend ;
2        title'Log of chromogen area by immuno-marker';
3        panelby movip species / layout=lattice onepanel rowheaderpos=left ;
4        series  x=order y=logpr /
5                group=subject
6                markers
7                markerattrs=(symbol=circle)
8                break
9                lineattrs=(pattern=1)
10               ;
11       colaxis type=discrete
12               discreteorder=data
13               valuesdisplay=("CD3" "CD20" "CD79a" "CD163" "Iba1" "IL-17")
14               valuesrotate=diagonal2
15               label="marker"
16               ;
17       rowaxis grid ;
18   run;

NOTE: Writing HTML Body file: sashtml.htm
NOTE: PROCEDURE SGPANEL used (Total process time):
      real time           2.76 seconds
      cpu time            0.29 seconds

NOTE: There were 181 observations read from the data set SASUSER.LOGPR.

19   title;title2;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Where you expect a break do you have an X value and a missing Y variable value? If the X value is not there then you do not have a qualified break in the values.

 

data example;
   do x=1 to 10;
      y= rand('uniform');
      if x ne 3 then y2= rand('normal');
      else y2=.;
      output;
   end;
run;


proc sgplot data=example;
   /* no missing y for the x*/
   series x=x y=y / break;
   /* missing y2 for the x=3*/
   series x=x y=y2 /break;
run;

View solution in original post

2 REPLIES 2
ballardw
Super User

Where you expect a break do you have an X value and a missing Y variable value? If the X value is not there then you do not have a qualified break in the values.

 

data example;
   do x=1 to 10;
      y= rand('uniform');
      if x ne 3 then y2= rand('normal');
      else y2=.;
      output;
   end;
run;


proc sgplot data=example;
   /* no missing y for the x*/
   series x=x y=y / break;
   /* missing y2 for the x=3*/
   series x=x y=y2 /break;
run;
das
Obsidian | Level 7 das
Obsidian | Level 7

Yes, that is what happened. The orginal data does not include rows for the missing data. When I added these back (i.e., now there is an x-value that has a '.' for y), then the breaks show up in the graph. That didn't dawn on me. Thank you so much. Here is the result:

 

SGPanel2.png

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1415 views
  • 0 likes
  • 2 in conversation