<?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: Manhattan-Like chart generation in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228082#M8261</link>
    <description>&lt;P&gt;Hi.&amp;nbsp; Here's an example using GPLOT (admittedly more stuff than SGPLOT).&amp;nbsp; It produced the attached chart (default color scheme used) ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* your data;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;data x;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;input class overall pct_over v_222 pct_222 v_233 pct_233 v_244 pct_244;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;datalines;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;4 3 1 0 0 0 0 3 2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;5 22 15 60 45 31 15 40 30&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;7 50 35 58 38 44 33 33 40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;8 130 27 77 32 50 40 20 15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;9 70 18 18 13 15 11 18 9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;10 33 8 13 8 17 8 9 7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;13 9 4 6 4 25 20 7 4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;14 11 2 2 1 7 3 1 1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;16 18 6 0 0 9 8 4 5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;17 12 3 0 0 4 2 5 5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;19 8 2 0 0 6 3 1 1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;20 6 1 0 0 3 1 2 3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* rearrange your data for use in PROC GCHART;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* three variables in new data set;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* CLASS;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* _NAME_ (the name of the PCT variable from data set x);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* COL1 (values of percentages in data set x);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc transpose data=x out=y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;by class;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;var pct: ;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* rescale the percentages from 0-100 to 0-1 (so you can use the PERCENT format in GCHART);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;data y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;set y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;col1 = col1/100;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* specify a destination for the PNG file produced by GCHART;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;filename gout 'z:\chart.png';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* specify details for the chart;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;goptions reset=all gunit=pct ftext='calibri' htext=2 gsfname=gout &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dev=png xpixels=1500 ypixels=1000;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* override the default axis look in GCHART;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;axis1 label=none value=none;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;axis2 label=none offset=(2,2)pct;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;axis3 label=(h=3 a=90 'ACCOUNT(%)') order=0 to .50 by .05 minor=none;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* move the legend inside the chart frame and tweak defaults;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;legend1 position=(top inside right) across=1 label=none shape=bar(3,4)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value=('V_222' 'V_233' 'V_244' 'OVERALL') mode=protect offset=(-5,-5)pct;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* adds whitespace at top;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;title1 ls=2;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* adds a centered label for the horizontal access;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;footnote1 h=3 j=c 'CLASS';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* draw the chart (produces a PNG file);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc gchart data=y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;vbar _name_ / subgroup=_name_ sumvar=col1 group=class&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;maxis=axis1 gaxis=axis2 raxis=axis3 &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;space=0 legend=legend1;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;format col1 percent.;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;quit;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11987iDB252D13AA39DBCB/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="chart.png" title="chart.png" /&gt;</description>
    <pubDate>Thu, 01 Oct 2015 17:02:41 GMT</pubDate>
    <dc:creator>MikeZdeb</dc:creator>
    <dc:date>2015-10-01T17:02:41Z</dc:date>
    <item>
      <title>Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/227997#M8256</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need a hand in producing a bar chart that is Manhattan-like. X-axis is one of the variables in my dataset and Y-axis should be generated automatically with a suitable low/high limits where these limits would be again taken from the values of the variables represented by the bar chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to attach an Excel sheet that shows exactly what I mean (3 series of data [3 variables PCT_222, PCT_233, PCT_244) all together in the same plot and their X-axis is a variable called (Class) while their Y-axis is generated automatically using their values all together), but I was unable to due to the fact that the third shows .xlsx as invalid extension. Therefore, I attached a PDF that&amp;nbsp;is generated by the Excel sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if this is direct in SAS or not and&amp;nbsp;I hope so.I searched before writing here but could not find any useful resource which shows somthing similar to my requirement and a straight answer to it. Therefore, I hope the Graph/ODS experts here can assit in resolving this problem which might turned to be a trivial one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 06:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/227997#M8256</guid>
      <dc:creator>22</dc:creator>
      <dc:date>2015-10-01T06:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/227998#M8257</link>
      <description>Just to add, I'm using SAS 9.3</description>
      <pubDate>Thu, 01 Oct 2015 06:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/227998#M8257</guid>
      <dc:creator>22</dc:creator>
      <dc:date>2015-10-01T06:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228024#M8258</link>
      <description>&lt;P&gt;You should have a look at ODS Graphics. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54﻿&lt;/a&gt; maintains a &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_self"&gt;blog &lt;/A&gt;with lots of great examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get you started find below some sample code. I have not tested it with SAS 9.3, you have a go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards dlm=",";
  input
    Class
    Overall pct_overall : percent10.
    V_222 PCT_222 : percent10.
    V_233 PCT_233 : percent10.
    V_244  PCT_244: percent10.
  ;
  format pct_: percent10.2;
  cards;
4,3,1%,0,0%,0,0%,3,2%
5,22,15%,60,45%,31,15%,40,30%
7,50,35%,58,38%,44,33%,33,40%
8,130,27%,77,32%,50,40%,20,15%
9,70,18%,18,13%,15,11%,18,9%
10,33,8%,13,8%,17,8%,9,7%
13,9,4%,6,4%,25,20%,7,4%
14,11,2%,2,1%,7,3%,1,1%
16,18,6%,0,0%,9,8%,4,5%
17,12,3%,0,0%,4,2%,5,5%
19,8,2%,0,0%,6,3%,1,1%
20,6,1%,0,0%,3,1%,2,3%
;

proc sgplot data=have;
  vbar class / response=pct_overall barwidth=0.2 discreteoffset=-0.3
    legendlabel="Overall" fillattrs=(color=cxffff00)
  ;
  vbar class / response=pct_222 barwidth=0.2 discreteoffset=-0.1
      legendlabel="V_222 "
  ;
  vbar class / response=pct_233 barwidth=0.2 discreteoffset=0.1
      legendlabel="V_233"
  ;
  vbar class / response=pct_244 barwidth=0.2 discreteoffset=0.3
      legendlabel="V_244"
  ;
  keylegend / noborder across=1 location=inside  position=right;
  yaxis label="Account(%)";
run;



proc transpose 
  data=have
  out=have_trsp
;
  by Class;
  var pct_:;
run;

proc sgplot data=have_trsp;
  vbar class /
    response=col1 group=_name_ groupdisplay=cluster GROUPORDER=DATA
  ;
  yaxis label="Account(%)";
  keylegend / 
    across=1 noborder location=inside  position=right title=""
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 12:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228024#M8258</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-10-01T12:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228048#M8259</link>
      <description>&lt;P&gt;Hi. &amp;nbsp;Not sure what you mean by a Manhattan plot since your exaple does not look like what I understand such a plot to be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want a standard Manhattan plot, take a look at ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Creating Manhattan Plots with SAS/Graph&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;&lt;A href="http://www.sascommunity.org/wiki/Creating_Manhattan_Plots_with_SAS/Graph" target="_blank"&gt;http://www.sascommunity.org/wiki/Creating_Manhattan_Plots_with_SAS/Graph&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First paragraph in this link ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A Manhattan plot is a type of bar chart that is sometimes used in the visualization of genome-wide association data. Some examples can be found by using Google to search for "Manhattan plots" then clicking on "Images" on the upper left-hand side of the search results. You can see Manhattan plots used in publications by clicking on either of the following links: example 1 or example 2.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;has couple links to Manhattan plots in publications.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 14:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228048#M8259</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-10-01T14:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228082#M8261</link>
      <description>&lt;P&gt;Hi.&amp;nbsp; Here's an example using GPLOT (admittedly more stuff than SGPLOT).&amp;nbsp; It produced the attached chart (default color scheme used) ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* your data;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;data x;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;input class overall pct_over v_222 pct_222 v_233 pct_233 v_244 pct_244;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;datalines;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;4 3 1 0 0 0 0 3 2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;5 22 15 60 45 31 15 40 30&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;7 50 35 58 38 44 33 33 40&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;8 130 27 77 32 50 40 20 15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;9 70 18 18 13 15 11 18 9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;10 33 8 13 8 17 8 9 7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;13 9 4 6 4 25 20 7 4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;14 11 2 2 1 7 3 1 1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;16 18 6 0 0 9 8 4 5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;17 12 3 0 0 4 2 5 5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;19 8 2 0 0 6 3 1 1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;20 6 1 0 0 3 1 2 3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* rearrange your data for use in PROC GCHART;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* three variables in new data set;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* CLASS;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* _NAME_ (the name of the PCT variable from data set x);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* COL1 (values of percentages in data set x);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc transpose data=x out=y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;by class;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;var pct: ;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* rescale the percentages from 0-100 to 0-1 (so you can use the PERCENT format in GCHART);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;data y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;set y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;col1 = col1/100;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* specify a destination for the PNG file produced by GCHART;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;filename gout 'z:\chart.png';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* specify details for the chart;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;goptions reset=all gunit=pct ftext='calibri' htext=2 gsfname=gout &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dev=png xpixels=1500 ypixels=1000;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* override the default axis look in GCHART;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;axis1 label=none value=none;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;axis2 label=none offset=(2,2)pct;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;axis3 label=(h=3 a=90 'ACCOUNT(%)') order=0 to .50 by .05 minor=none;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* move the legend inside the chart frame and tweak defaults;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;legend1 position=(top inside right) across=1 label=none shape=bar(3,4)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value=('V_222' 'V_233' 'V_244' 'OVERALL') mode=protect offset=(-5,-5)pct;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* adds whitespace at top;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;title1 ls=2;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* adds a centered label for the horizontal access;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;footnote1 h=3 j=c 'CLASS';&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;* draw the chart (produces a PNG file);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc gchart data=y;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;vbar _name_ / subgroup=_name_ sumvar=col1 group=class&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;maxis=axis1 gaxis=axis2 raxis=axis3 &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;space=0 legend=legend1;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;format col1 percent.;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;quit;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11987iDB252D13AA39DBCB/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="chart.png" title="chart.png" /&gt;</description>
      <pubDate>Thu, 01 Oct 2015 17:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228082#M8261</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-10-01T17:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228356#M8277</link>
      <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;Thanks for your time and I really appreciate your professional answer as a complete solution including recreating the data and perform all necessary steps to reach to proc sgplot. In addition, doing the sgplot using two approaches (though I liked the transposed data as it shortened the code even with the extra step of proc transpose).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot that is exactly what I want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last small question, Can I control the vbar colors for each group?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2015 20:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228356#M8277</guid>
      <dc:creator>22</dc:creator>
      <dc:date>2015-10-04T20:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228357#M8278</link>
      <description>&lt;P&gt;Hi MikeZdeb,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to thank you too for the professional answer you provided. This has also an added value as you've used different proc (proc gchart) which did a similar result but with a slightly different way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot &lt;SPAN&gt;MikeZdeb.&lt;/SPAN&gt;&amp;nbsp;I'd also consider this as a full answer to my query.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2015 20:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228357#M8278</guid>
      <dc:creator>22</dc:creator>
      <dc:date>2015-10-04T20:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Manhattan-Like chart generation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228383#M8280</link>
      <description>&lt;P&gt;Have a look here, with SAS 9.4 it is very easy, with SAS 9.3, there is some more effort&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 07:08:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Manhattan-Like-chart-generation/m-p/228383#M8280</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-10-05T07:08:06Z</dc:date>
    </item>
  </channel>
</rss>

