<?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 line plot all info without transpose?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982314#M379301</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have data below. Dataset also attached.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to line plot all the info into one Picture, without Proc Transpose?!&lt;/P&gt;
&lt;P&gt;Ten lines: one row for each&lt;/P&gt;
&lt;P&gt;y=the value of&amp;nbsp; off_max_ct_xx:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x=100/80/60/40/30/20/10/5 at the column names[off_max_ct_xx]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&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="sc.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112727i30A5782D9B507F04/image-size/large?v=v2&amp;amp;px=999" role="button" title="sc.jpg" alt="sc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Best practice is to NOT arrange the data like this in the first place. Specifically, you have incorporated some meaningful data that the plot needs in the variable name — in this case, specifically, the data in the variable name is the _100 and _80 and so on. Data belongs in variable values, not in the variable name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So a better arrangement would be to have the 100 and 80 and so on in their own variable, perhaps named VALUE, which contains the numeric values 100 and 80 and so on. This is called a long data set, and is always preferable to storing data in variable names. Why? Because most SAS procedures are designed to work on long data sets. In your case, the graph you want can ONLY be created from a long data set, so a transpose is required, and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;has provided a transpose for you, even if it is not PROC TRANSPOSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_self"&gt;Maxim 19&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jan 2026 10:21:38 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2026-01-22T10:21:38Z</dc:date>
    <item>
      <title>How to line plot all info without transpose?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982297#M379296</link>
      <description>&lt;P&gt;I have data below. Dataset also attached.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to line plot all the info into one Picture, without Proc Transpose?!&lt;/P&gt;
&lt;P&gt;Ten lines: one row for each&lt;/P&gt;
&lt;P&gt;y=the value of&amp;nbsp; off_max_ct_xx:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x=100/80/60/40/30/20/10/5 at the column names[off_max_ct_xx]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&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="sc.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112727i30A5782D9B507F04/image-size/large?v=v2&amp;amp;px=999" role="button" title="sc.jpg" alt="sc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 04:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982297#M379296</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-22T04:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to line plot all info without transpose?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982298#M379297</link>
      <description>&lt;P&gt;Transpose is fine if too tough to do so.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 04:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982298#M379297</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-22T04:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to line plot all info without transpose?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982304#M379298</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x v9 'C:\Users\xiakeshan\Documents\Downloads';
data x;
 set x._t_mm_temp_coll_n;
 array _x{*} off_max_ct_: ;
 do i=1 to dim(_x);
   y=_x{i};
   x=input(scan(vname(_x{i}),-1,'_'),best.);
   output;
 end;
 keep x y xahead;
run;

proc sgplot data=x;
series x=x y=y /group=xahead ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1769068243026.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112728i1EF3C2254A896C3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1769068243026.png" alt="Ksharp_0-1769068243026.png" /&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="Ksharp_1-1769068257156.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112729i8BDE0097146A0296/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1769068257156.png" alt="Ksharp_1-1769068257156.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 07:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982304#M379298</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-01-22T07:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to line plot all info without transpose?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982314#M379301</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have data below. Dataset also attached.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to line plot all the info into one Picture, without Proc Transpose?!&lt;/P&gt;
&lt;P&gt;Ten lines: one row for each&lt;/P&gt;
&lt;P&gt;y=the value of&amp;nbsp; off_max_ct_xx:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x=100/80/60/40/30/20/10/5 at the column names[off_max_ct_xx]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&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="sc.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112727i30A5782D9B507F04/image-size/large?v=v2&amp;amp;px=999" role="button" title="sc.jpg" alt="sc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Best practice is to NOT arrange the data like this in the first place. Specifically, you have incorporated some meaningful data that the plot needs in the variable name — in this case, specifically, the data in the variable name is the _100 and _80 and so on. Data belongs in variable values, not in the variable name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So a better arrangement would be to have the 100 and 80 and so on in their own variable, perhaps named VALUE, which contains the numeric values 100 and 80 and so on. This is called a long data set, and is always preferable to storing data in variable names. Why? Because most SAS procedures are designed to work on long data sets. In your case, the graph you want can ONLY be created from a long data set, so a transpose is required, and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;has provided a transpose for you, even if it is not PROC TRANSPOSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_self"&gt;Maxim 19&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 10:21:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982314#M379301</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-01-22T10:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to line plot all info without transpose?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982320#M379302</link>
      <description>&lt;P&gt;Thanks for your suggestion. The columns are gotten from SQL once for all. I know how to transpose, just feel&amp;nbsp;&lt;/P&gt;
&lt;P&gt;something can be better.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 11:29:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982320#M379302</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-22T11:29:36Z</dc:date>
    </item>
  </channel>
</rss>

