<?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: How to create a barchart without dataset? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487438#M127018</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185853"&gt;@marysmith&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi thanky for your quick replay. I need to draw a bar chart with those data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Thank you for your help&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One way for one of the variables:&lt;/P&gt;
&lt;PRE&gt;data work.datensatz_0810;
  input year numberofstudies numberofphysicians numberofpatients unique_drugs sponsor;
datalines;
2008 185 41834 368481 154 92
2009 185 41961 349424 154 98
2010 188 42967 359147 152 90
;
run;

proc sgplot data=work.datensatz_0810;
   vbarparm category=year response=numberofphysicians;
run;&lt;/PRE&gt;
&lt;P&gt;If that is not the type of bar chart you were expecting then you really need to describe more of what you actually want or investigate the link that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;mentioned to find something you like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Aug 2018 14:30:33 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-08-16T14:30:33Z</dc:date>
    <item>
      <title>How to create a barchart without dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487356#M126984</link>
      <description>&lt;P&gt;Hello &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a bar chart without a proper dataset.&lt;/P&gt;&lt;P&gt;I only have a table with the aggregated value and need to make a bar chart.&lt;/P&gt;&lt;P&gt;i tried to put those values into SAS but as I only have one obervation for each year the bar chart has a total frequency of 1 as you can see on the picture.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="balkendiagramm0810.JPG" style="width: 418px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22480iDCCC1F34BDA33E8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="balkendiagramm0810.JPG" alt="balkendiagramm0810.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA datensatz_0810;
  INPUT year Numberofstudies Numberofphysicians Numberofpatients unique_drugs sponsor;
  DATALINES;
  2008 185 41834 368481 154 92
  2009 185 41961 349424 154 98
  2010 188 42967 359147 152 90
 ;
RUN;

itle 'Number of Studies from 2008-2010';

axis1 label=('Number of studies');
axis2 label=('year');

proc gchart data=datensatz_0810;
vbar year /midpoints=(2008 2009 2010);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is this even possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;2008&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;2009&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;2010&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;No of studies&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;150&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;190&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;130&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;No of doctors&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;41 000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;42 000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;43 000&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;No of patients&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;360 000&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;350 000&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;365 000&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;No of unique drugs&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;154&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;154&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;152&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;No of Sponsors&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;92&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;98&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;90&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 16 Aug 2018 11:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487356#M126984</guid>
      <dc:creator>marysmith</dc:creator>
      <dc:date>2018-08-16T11:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a barchart without dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487380#M126996</link>
      <description>&lt;P&gt;Its very hard to tell you how to do something if I don't know what it is you want at the end.&amp;nbsp; I would highly recommend moving to sgplot/gtl:&lt;/P&gt;
&lt;PRE&gt;data datensatz_0810;
  input year numberofstudies numberofphysicians numberofpatients unique_drugs sponsor;
datalines;
2008 185 41834 368481 154 92
2009 185 41961 349424 154 98
2010 188 42967 359147 152 90
;
run;

title 'Number of Studies from 2008-2010';

proc sgplot data=datensatz_0810;
  vbar year / response=numberofstudies;
  xaxis display=(nolabel);
  yaxis grid;
run;&lt;/PRE&gt;
&lt;P&gt;Wherein you can find endless information at:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 12:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487380#M126996</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-16T12:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a barchart without dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487382#M126997</link>
      <description>Hi thanky for your quick replay. I need to draw a bar chart with those data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Thank you for your help&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Aug 2018 12:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487382#M126997</guid>
      <dc:creator>marysmith</dc:creator>
      <dc:date>2018-08-16T12:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a barchart without dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487384#M126999</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;I need to draw a bar chart with those data" - this does not tell me anything.&amp;nbsp; What do you want the output to look like?&amp;nbsp; Horizontal/vertical, grouped, stacked?&amp;nbsp; There is half a million types of each graph.&amp;nbsp; Check out the link i provided, there is source code for many thousands of graphs, its a great resource, for instance:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/10/12/advanced-ods-graphics-two-types-axis-tables/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2017/10/12/advanced-ods-graphics-two-types-axis-tables/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 12:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487384#M126999</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-16T12:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a barchart without dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487438#M127018</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185853"&gt;@marysmith&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi thanky for your quick replay. I need to draw a bar chart with those data &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Thank you for your help&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One way for one of the variables:&lt;/P&gt;
&lt;PRE&gt;data work.datensatz_0810;
  input year numberofstudies numberofphysicians numberofpatients unique_drugs sponsor;
datalines;
2008 185 41834 368481 154 92
2009 185 41961 349424 154 98
2010 188 42967 359147 152 90
;
run;

proc sgplot data=work.datensatz_0810;
   vbarparm category=year response=numberofphysicians;
run;&lt;/PRE&gt;
&lt;P&gt;If that is not the type of bar chart you were expecting then you really need to describe more of what you actually want or investigate the link that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;mentioned to find something you like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 14:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-barchart-without-dataset/m-p/487438#M127018</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-16T14:30:33Z</dc:date>
    </item>
  </channel>
</rss>

