<?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 How do you make a chart with repeating x axis values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454785#M128664</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have 2 columns like that I want to plot:&lt;BR /&gt;
x   y&lt;BR /&gt;
1579    1&lt;BR /&gt;
1707    2&lt;BR /&gt;
1707    3&lt;BR /&gt;
1707    4&lt;BR /&gt;
1707    5&lt;BR /&gt;
1707    6&lt;BR /&gt;
1707    7&lt;BR /&gt;
1707    8&lt;BR /&gt;
1707    9&lt;BR /&gt;
1707    10&lt;/P&gt;

&lt;P&gt;When I see the visualization with this search command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="splunk_test1.txt" host="Sriharshas-MacBook-Pro.local" sourcetype="temp" | table x, y | sort y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get a plot like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6018i3B6D528B431BCA69/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But I am looking for a plot like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6019i713B6A37A02403BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;What should be my search command to get the required plot?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 17:47:42 GMT</pubDate>
    <dc:creator>sriharsha14</dc:creator>
    <dc:date>2018-10-29T17:47:42Z</dc:date>
    <item>
      <title>How do you make a chart with repeating x axis values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454785#M128664</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have 2 columns like that I want to plot:&lt;BR /&gt;
x   y&lt;BR /&gt;
1579    1&lt;BR /&gt;
1707    2&lt;BR /&gt;
1707    3&lt;BR /&gt;
1707    4&lt;BR /&gt;
1707    5&lt;BR /&gt;
1707    6&lt;BR /&gt;
1707    7&lt;BR /&gt;
1707    8&lt;BR /&gt;
1707    9&lt;BR /&gt;
1707    10&lt;/P&gt;

&lt;P&gt;When I see the visualization with this search command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="splunk_test1.txt" host="Sriharshas-MacBook-Pro.local" sourcetype="temp" | table x, y | sort y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get a plot like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6018i3B6D528B431BCA69/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But I am looking for a plot like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6019i713B6A37A02403BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;What should be my search command to get the required plot?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 17:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454785#M128664</guid>
      <dc:creator>sriharsha14</dc:creator>
      <dc:date>2018-10-29T17:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a chart with repeating x axis values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454786#M128665</link>
      <description>&lt;P&gt;&lt;CODE&gt;source="splunk_test1.txt" host="Sriharshas-MacBook-Pro.local" sourcetype="temp" | table x, y | sort y | stats max(x) by y&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Instead of &lt;CODE&gt;max(x)&lt;/CODE&gt;, you could also try &lt;CODE&gt;sum(x)&lt;/CODE&gt;, depending on what that data represents&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 03:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454786#M128665</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2018-10-30T03:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do you make a chart with repeating x axis values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454787#M128666</link>
      <description>&lt;P&gt;This command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    source="splunk_test1.txt" sourcetype="temp" | table x, y | sort y | stats sum(x) as x1 by y | sort y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;treats x1 as integer, but the plot is with x and y axis interchanged. &lt;/P&gt;

&lt;P&gt;When I do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    source="splunk_test1.txt" sourcetype="temp" | table x, y | sort y | stats sum(x) as x1 by y | sort y | table x1, y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the same plot as the one in the question. &lt;/P&gt;

&lt;P&gt;It looks like, with repeating x-axis values (to generate a vertical line), the plotting routine changes the data type of the x-axis values.&lt;/P&gt;

&lt;P&gt;I also tried this command to avoid repeating x-axis values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="splunk_test1.txt" sourcetype="temp" | table x, y | sort y | eval x = x+y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Even with this, I get the similar plot as the one in question&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 17:20:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-make-a-chart-with-repeating-x-axis-values/m-p/454787#M128666</guid>
      <dc:creator>sriharsha14</dc:creator>
      <dc:date>2018-10-30T17:20:11Z</dc:date>
    </item>
  </channel>
</rss>

