<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Proc Sgplot : Break option Not working in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492166#M16876</link>
    <description>&lt;P&gt;Add missing values with something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data freqOutPlus;
retain lastEvent;
set freqOut(rename=(percent=newPercent yy_event=newEvent));
by class;
if not first.class then do;
    do yy_event = lastEvent+1 to newEvent - 1;
        output;
        end;
yy_event = newEvent;
percent = newPercent;
output;
lastEvent = newEvent;
drop newPercent newEvent lastEvent;
run;



proc sgplot data=FreqOutPlus....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(untested)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Sep 2018 03:35:37 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-09-04T03:35:37Z</dc:date>
    <item>
      <title>Proc Sgplot : Break option Not working</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492072#M16871</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the following code below I get the below series graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Issue I'm facing is that for the Team_Member_Unable_to_reach category, between the years 2016 and 2018, the line&lt;/P&gt;&lt;P&gt;does not break as It should be, as for that specific category there are no lines in the dataset (the combination is missing )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should not the break option allow for the line to break into two dots? Any idea on what could be the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bests&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22956iB71A5F78C278AF0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Figure 2.04 : Time series main components No promotional effect ';

proc sgplot data=FreqOut (where=(outcome_rev like '%No_sales_gen_effec%'));
series x=yy_event y=Percent /markers group=class grouporder=data break nomissinggroup ;
xaxis type=discrete;
yaxis grid values=(0 to 30 by 10) label="Percentage of Total with Group";
run;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22955i9FCD11C57FF10ACD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 15:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492072#M16871</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2018-09-03T15:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sgplot : Break option Not working</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492092#M16872</link>
      <description>&lt;P&gt;If I am understanding your question, here is an example that demonstrates that the BREAK option is working as expected.&amp;nbsp; Perhaps your data has a different form?&amp;nbsp;You can modify the example to illustrate the situation that you are seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
input Class $ Year Y;
datalines;
A 2015 1
A 2016 2
A 2017 1
A 2018 3
B 2015 .
B 2016 1
B 2017 .
B 2018 2
;

proc sgplot data=Have;
series x=Year y=Y /markers group=class grouporder=data break nomissinggroup ;
xaxis type=discrete;
yaxis grid ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Sep 2018 18:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492092#M16872</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-09-03T18:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sgplot : Break option Not working</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492094#M16873</link>
      <description>&lt;P&gt;I think you need observations with missing values for the BREAK option to have an effect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example below produces three graphics.&amp;nbsp; The BREAK option has an effect in two of the three graphics.&amp;nbsp; The graphic where BREAK doesn't have an effect is a data set with no missing values.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ibm;
  set sashelp.stocks(where=("02dec2002"d &amp;lt;= date &amp;lt;= "03feb2003"d and stock='IBM'));
  if date="02jan2003"d then
    do;
      high=.;
      low=.;
    end;
run;

proc transpose data=ibm(drop=volume adjclose)
               out=transposed_ibm(rename=(_name_=type col1=price));
  by stock date notsorted;
run;

proc sgplot data=ibm;
  title "Stock Trend";
  title2 'Modified version of ' 
         italic color=green 'Example 3: Plotting Three Series' 
         font='Albany AMT' bold color=black ' in online documentation';
  
  series x=date y=close / markers break;
  series x=date y=low / markers break;
  series x=date y=high / markers break;
  
  yaxis label='Price';
run;

proc sgplot data=transposed_ibm(where=(type in ('Close','Low','High')));
  title "Stock Trend with By Group";
  title2 'Data set includes missing values';
  
  series x=date y=price / markers 
                          markerattrs=(symbol=circlefilled) 
                          group=type 
                          break
                          nomissinggroup;
                       
  yaxis label='Price';
  keylegend / title='';
run;

data ibm_no_missing;
  set transposed_ibm;
  if price = . then delete;
run;

proc sgplot data=ibm_no_missing(where=(type in ('Close','Low','High')));
  title "Stock Trend with By Group";
  title2 "Missing values removed from data set";
  
  series x=date y=price / markers 
                          markerattrs=(symbol=circlefilled) 
                          group=type 
                          break
                          nomissinggroup;
                       
  yaxis label='Price';
  keylegend / title='';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3 series plots, two series with missing values, BREAK has an effect" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22957i691D80E693897DED/image-size/large?v=v2&amp;amp;px=999" role="button" title="Modified version of Stock Trend graph from online documentation.jpg" alt="3 series plots, two series with missing values, BREAK has an effect" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;3 series plots, two series with missing values, BREAK has an effect&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Series plot with grouped data, two groups have observations with missing values, BREAK has an effect" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22958iEB3BAD429E3A4B42/image-size/large?v=v2&amp;amp;px=999" role="button" title="Series plot some groups have missing values so line breaks.jpg" alt="Series plot with grouped data, two groups have observations with missing values, BREAK has an effect" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Series plot with grouped data, two groups have observations with missing values, BREAK has an effect&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Series plot with grouped data, missing values deleted from data set, BREAK has no effect" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22959iA7F972D1C23DC7AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Series plot missing observations removed so break has no effect.jpg" alt="Series plot with grouped data, missing values deleted from data set, BREAK has no effect" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Series plot with grouped data, missing values deleted from data set, BREAK has no effect&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 18:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492094#M16873</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-09-03T18:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sgplot : Break option Not working</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492107#M16874</link>
      <description>&lt;P&gt;Hi Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my dataset there are no observations for the missing combination category/period. Using your example, It is like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; Have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;Class&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Year&lt;/SPAN&gt; Y&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token datalines"&gt;&lt;SPAN class="token keyword"&gt;datalines&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token data string"&gt;A 2015 1
A 2016 2
A 2017 1
A 2018 3

B 2016 1

B 2018 2&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 19:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492107#M16874</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2018-09-03T19:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sgplot : Break option Not working</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492108#M16875</link>
      <description>&lt;P&gt;Thank you Suzanne. So the Break option does not work with actual missing observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the dataset it is created with a Proc Freq, I understand I should find a way to create missing observation for the actual missing combinations of Categories * Period&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 19:30:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492108#M16875</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2018-09-03T19:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sgplot : Break option Not working</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492166#M16876</link>
      <description>&lt;P&gt;Add missing values with something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data freqOutPlus;
retain lastEvent;
set freqOut(rename=(percent=newPercent yy_event=newEvent));
by class;
if not first.class then do;
    do yy_event = lastEvent+1 to newEvent - 1;
        output;
        end;
yy_event = newEvent;
percent = newPercent;
output;
lastEvent = newEvent;
drop newPercent newEvent lastEvent;
run;



proc sgplot data=FreqOutPlus....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(untested)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 03:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Sgplot-Break-option-Not-working/m-p/492166#M16876</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-09-04T03:35:37Z</dc:date>
    </item>
  </channel>
</rss>

