<?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: X axis labeling with two labels in same graph in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298665#M5371</link>
    <description>&lt;P&gt;Thank you for the reply. No that is not I was looking for. Can you see my PDf attacment? The example I have on PDF is what exactly I am looking for. Is this possible?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2016 14:43:00 GMT</pubDate>
    <dc:creator>smunigala</dc:creator>
    <dc:date>2016-09-15T14:43:00Z</dc:date>
    <item>
      <title>X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298078#M5349</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am looking for help in creating graphs with two sets of labeling for X-axis. I am attaching my excel sheet, SAS code and the graphs&amp;nbsp; I had generated. Basicially I want two X-axis labeling (Independent Studies and Studies) in the same graph.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for all the help,&lt;/P&gt;
&lt;P&gt;Satish&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing close;
ods graphics / reset width=600px height=400px imagename='Fig 1' imagefmt=jpeg;
ods html file='Surg.html' path='E:\HRM\Revised\Revised18_New' style=journal; 

/*ods html file='ap.html' path='C:\' style=journal; */
 proc sgplot data=graphs;
 scatter X=Studies Y=MP /  markerattrs=(color=blue symbol=CircleFilled size=8) name="scat" legendlabel="Motor Pattern";
 series X=Studies Y=MP /  lineattrs=(color=blue pattern=1) ;
scatter X=Studies Y=BP /  markerattrs=(color=red symbol=SquareFilled size=8) name="scat1" legendlabel="Body Pattern";
 series X=Studies Y=BP /  lineattrs=(color=red pattern=1) ;
scatter X=Studies Y=OutOb /  markerattrs=(color=green symbol=TriangleFilled size=8) name="scat2" legendlabel="Achalasia/ Outflow obstruction";
 series X=Studies Y=OutOb /  lineattrs=(color=green pattern=1) ;

 XAXIS TYPE = DISCRETE ;
 YAXIS LABEL = '% Accuracy'    VALUES = (0 TO 100 BY 10);
keylegend "scat" "scat1" "scat2"  "scat4"  / position=bottomleft
across=1 location=inside ;
 run;
ods html close;
ods listing;





ods listing close;
ods graphics / reset width=600px height=400px imagename='Fig 1_New' imagefmt=jpeg;
ods html file='Surg.html' path='E:\HRM\Revised\Revised18_New' style=journal; 

/*ods html file='ap.html' path='C:\' style=journal; */
 proc sgplot data=graphs;
 scatter  X=Independent_Studies Y=MP /  markerattrs=(color=blue symbol=CircleFilled size=8) name="scat" legendlabel="Motor Pattern";
 series  X=Independent_Studies Y=MP /  lineattrs=(color=blue pattern=1) ;
scatter  X=Independent_Studies Y=BP /  markerattrs=(color=red symbol=SquareFilled size=8) name="scat1" legendlabel="Body Pattern";
 series  X=Independent_Studies Y=BP /  lineattrs=(color=red pattern=1) ;
scatter  X=Independent_Studies Y=OutOb /  markerattrs=(color=green symbol=TriangleFilled size=8) name="scat2" legendlabel="Achalasia/ Outflow obstruction";
 series X=Independent_Studies Y=OutOb /  lineattrs=(color=green pattern=1) ;

 XAXIS TYPE = DISCRETE ;
 YAXIS LABEL = '% Accuracy'    VALUES = (0 TO 100 BY 10);
keylegend "scat" "scat1" "scat2"  "scat4"  / position=bottomleft
across=1 location=inside ;
 run;
ods html close;
ods listing;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4912iE9C280CBE8C490B6/image-size/original?v=v2&amp;amp;px=-1" alt="Fig 1.jpeg" title="Fig 1.jpeg" border="0" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4913i434A4FFFBCD8CBB1/image-size/original?v=v2&amp;amp;px=-1" alt="Fig 1_New.jpeg" title="Fig 1_New.jpeg" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298078#M5349</guid>
      <dc:creator>smunigala</dc:creator>
      <dc:date>2016-09-13T15:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298622#M5365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put your code in a macro block and parameterize it, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data graphs;
   infile cards expandtabs truncover;
   input Independent_Studies Studies MP MP_Low MP_High BP BP_Low BP_High OutOb Outob_Low OutOb_High Mx Mx_low Mx_High MxEGJ MxEGJ_low MxEGJ_High Fundo Fundo_Low Fundo_High ;
   cards;
   1 1 50 45 50 55 50 60 70 65 75 80 75 85 68.4 63.2 73.7 66.7 61.1 72.2 
   5 15 85 80 90 65 60 82.9 75 56.7 80 55 50 60 90 71.9 95 50 39.5 60.5 
   10 30 94.4 74.7 100 65 46.7 70 80 54.2 85 65 60 70 80 54.2 85 35.3 13.4 59.3 
   15 45 94.1 73.2 100 41.2 18.1 47.1 70.6 48.9 85.9 76.5 70.6 82.4 66.7 39.8 87.6 42.9 29.3 72.8 
   20 60 93.8 77.6 100 41.2 18.1 47.1 68.8 52.5 75 81.3 75 87.5 73.3 52.1 85.9 75 52.3 81.2
   ;
run;


%MACRO doGraph(var=,xlabel=);
   ods listing close;
   ods graphics / reset width=600px height=400px imagename="Fig 1 &amp;amp;xlabel." imagefmt=jpeg;
   ods html file='Surg.html' path='E:\HRM\Revised\Revised18_New' style=journal; 

   proc sgplot data=graphs; 
      scatter X=Independent_Studies Y=MP / markerattrs=(color=blue symbol=CircleFilled size=8) name="scat" legendlabel="Motor Pattern"; 
      series X=Independent_Studies Y=MP / lineattrs=(color=blue pattern=1) ; 
      scatter X=Independent_Studies Y=BP / markerattrs=(color=red symbol=SquareFilled size=8) name="scat1" legendlabel="Body Pattern"; 
      series X=Independent_Studies Y=BP / lineattrs=(color=red pattern=1) ; 
      scatter X=Independent_Studies Y=OutOb / markerattrs=(color=green symbol=TriangleFilled size=8) name="scat2" legendlabel="Achalasia/ Outflow obstruction"; 
      series X=Independent_Studies Y=OutOb / lineattrs=(color=green pattern=1) ; 
      XAXIS TYPE = DISCRETE label="&amp;amp;xlabel."; 
      YAXIS LABEL = '% Accuracy' VALUES = (0 TO 100 BY 10); 
      keylegend "scat" "scat1" "scat2" "scat4" / position=bottomleft across=1 location=inside ; 
   run; 

   ods html close; 
   ods listing; 
%MEND doGraph; 

%doGraph(var=Studies,xlabel=Studies); 
%doGraph(var=Independent_Studies,xlabel=Independent Studies);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Oligolas&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 12:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298622#M5365</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2016-09-15T12:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298648#M5369</link>
      <description>&lt;P&gt;Thank you Oligolas. I ran your code. I did not get any errors, but it just gives me only one x-axis labeling (independent studies) and not for both. Can you help? I have SAS 9.4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot again!&lt;/P&gt;
&lt;P&gt;Satish&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 14:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298648#M5369</guid>
      <dc:creator>smunigala</dc:creator>
      <dc:date>2016-09-15T14:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298662#M5370</link>
      <description>&lt;P&gt;Hi I am not sure to understand?&lt;/P&gt;&lt;P&gt;Do you mean in the HTML? do you want both jpg in the same HTML?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like this?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO doGraph(var=,xlabel=);
   ods listing close;
   ods graphics / reset width=600px height=400px imagename="Fig 1 &amp;amp;xlabel." imagefmt=jpeg;
   

   proc sgplot data=graphs; 
      scatter X=Independent_Studies Y=MP / markerattrs=(color=blue symbol=CircleFilled size=8) name="scat" legendlabel="Motor Pattern"; 
      series X=Independent_Studies Y=MP / lineattrs=(color=blue pattern=1) ; 
      scatter X=Independent_Studies Y=BP / markerattrs=(color=red symbol=SquareFilled size=8) name="scat1" legendlabel="Body Pattern"; 
      series X=Independent_Studies Y=BP / lineattrs=(color=red pattern=1) ; 
      scatter X=Independent_Studies Y=OutOb / markerattrs=(color=green symbol=TriangleFilled size=8) name="scat2" legendlabel="Achalasia/ Outflow obstruction"; 
      series X=Independent_Studies Y=OutOb / lineattrs=(color=green pattern=1) ; 
      XAXIS TYPE = DISCRETE label="&amp;amp;xlabel."; 
      YAXIS LABEL = '% Accuracy' VALUES = (0 TO 100 BY 10); 
      keylegend "scat" "scat1" "scat2" "scat4" / position=bottomleft across=1 location=inside ; 
   run; 
   ods listing; 
%MEND doGraph; 

ods html file='Surg.html' path='E:\HRM\Revised\Revised18_New' style=journal; 
   %doGraph(var=Studies,xlabel=Studies); 
   %doGraph(var=Independent_Studies,xlabel=Independent Studies);
ods html close; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 14:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298662#M5370</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2016-09-15T14:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298665#M5371</link>
      <description>&lt;P&gt;Thank you for the reply. No that is not I was looking for. Can you see my PDf attacment? The example I have on PDF is what exactly I am looking for. Is this possible?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 14:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298665#M5371</guid>
      <dc:creator>smunigala</dc:creator>
      <dc:date>2016-09-15T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298704#M5372</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ok I understand,&lt;/P&gt;&lt;P&gt;with the x2axis statement it is possible to display 2 axis on one graph...&lt;/P&gt;&lt;P&gt;BUT:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;look at your data,&lt;/P&gt;&lt;P&gt;when independent_study has the value of 15 you have and MP value of 85&lt;/P&gt;&lt;P&gt;when study has the value of 15 you have and MP value of 94.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The figure you draw is unfortunately not correct, rethink about how you want to display the data.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 15:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298704#M5372</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2016-09-15T15:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298708#M5374</link>
      <description>&lt;P&gt;Yes, the figure is correct. That is how I want. For x-axis, the value of independent_studies 5 is the same as studies 15. So the data is exactly same but I need two different x-axis exactly how I have in the PDF. will it be possible? I hope I clarified the point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5 independent studies = 15 studies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298708#M5374</guid>
      <dc:creator>smunigala</dc:creator>
      <dc:date>2016-09-15T16:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298709#M5375</link>
      <description>&lt;P&gt;Independent_study 1 = Study 1&lt;/P&gt;
&lt;P&gt;Independent_study 5 = Study 15&lt;/P&gt;
&lt;P&gt;Independent_study 10 = Study 30&lt;/P&gt;
&lt;P&gt;Independent_study 15 = Study 45&lt;/P&gt;
&lt;P&gt;Independent_study 20 = Study 30&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298709#M5375</guid>
      <dc:creator>smunigala</dc:creator>
      <dc:date>2016-09-15T16:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298712#M5376</link>
      <description>&lt;P&gt;Oh sry my bad.&lt;/P&gt;&lt;P&gt;In this case try this, similar but not exactly what you posted.&lt;/P&gt;&lt;P&gt;I think what you want can be done with GTL but I never tried it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing close;
ods graphics / reset width=600px height=400px imagename="Fig 1" imagefmt=jpeg;
ods html file='Surg.html' path='E:\HRM\Revised\Revised18_New' style=journal; 
 
   proc sgplot data=graphs; 
      scatter  X=Independent_Studies Y=MP      / markerattrs=(color=blue symbol=CircleFilled size=8) legendlabel="Motor Pattern" x2axis; 
      scatter  X=Studies Y=MP      / markerattrs=(color=blue symbol=CircleFilled size=8) name="scat" legendlabel="Motor Pattern"; 
      series   X=Studies Y=MP      / lineattrs=(color=blue pattern=1) ; 
      scatter  X=Studies Y=BP      / markerattrs=(color=red symbol=SquareFilled size=8) name="scat1" legendlabel="Body Pattern"; 
      series   X=Studies Y=BP      / lineattrs=(color=red pattern=1) ; 
      scatter  X=Studies Y=OutOb   / markerattrs=(color=green symbol=TriangleFilled size=8) name="scat2" legendlabel="Achalasia/ Outflow obstruction"; 
      series   X=Studies Y=OutOb   / lineattrs=(color=green pattern=1) ; 
      XAXIS TYPE = DISCRETE label="Studies"; 
      X2AXIS TYPE = DISCRETE label="Independent Studies"; 
      YAXIS LABEL = '% Accuracy' VALUES = (0 TO 100 BY 10); 
      keylegend "scat" "scat1" "scat2" / position=bottomleft across=1 location=inside ; 
   run; 
ods html close; 
ods listing; &lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12985iDDDE0585B8030D4A/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Fig 1.jpg" title="Fig 1.jpg" /&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:22:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298712#M5376</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2016-09-15T16:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: X axis labeling with two labels in same graph</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298714#M5377</link>
      <description>&lt;P&gt;Thanks, this works!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Satish&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/X-axis-labeling-with-two-labels-in-same-graph/m-p/298714#M5377</guid>
      <dc:creator>smunigala</dc:creator>
      <dc:date>2016-09-15T16:22:46Z</dc:date>
    </item>
  </channel>
</rss>

