<?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: Scatter Plot for time x-axis and numbered Y axis in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307716#M92314</link>
    <description>&lt;P&gt;Kudos @murakoshi &lt;/P&gt;

&lt;P&gt;Nice technique. I was just trying to work out how to do this and came across this post. Thanks&lt;/P&gt;</description>
    <pubDate>Sun, 08 Mar 2020 09:19:17 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-03-08T09:19:17Z</dc:date>
    <item>
      <title>Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307694#M92292</link>
      <description>&lt;P&gt;I am looking to plot scatter plot to show all the data points in a particular time. Some how I am not able to get around it.&lt;BR /&gt;
I tried using this:&lt;BR /&gt;
..|eval time = _time | table time time_taken&lt;BR /&gt;
This gives me the scatter plot with all the data points but the time displays in epoch.&lt;/P&gt;

&lt;P&gt;Can i get a work around for this or a new method to get time in correct timestamp format.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:52:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307694#M92292</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2020-09-29T14:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307695#M92293</link>
      <description>&lt;P&gt;First of all, the &lt;CODE&gt;eval time=_time&lt;/CODE&gt; should really be &lt;CODE&gt;rename _time AS time&lt;/CODE&gt; but even so, that part is exactly your problem.  The &lt;CODE&gt;_time&lt;/CODE&gt; field is very special.  It is actually an epoch but it has a &lt;CODE&gt;fieldformat&lt;/CODE&gt; automatically applied to it based on your region/preference settings to make it human-readable.  Many of the built-in Splunk visualizations ( particularly the &lt;CODE&gt;Line Chart&lt;/CODE&gt; and &lt;CODE&gt;Area Chart&lt;/CODE&gt; ) treat &lt;CODE&gt;_time&lt;/CODE&gt; in a special way and if you use the same value but with a different field name, these will behave very differently.  What is wrong with this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table _time time_taken
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 15 Jul 2017 20:42:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307695#M92293</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-15T20:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307696#M92294</link>
      <description>&lt;P&gt;I need a scatter plot! Thats the whole idea!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 22:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307696#M92294</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-15T22:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307697#M92295</link>
      <description>&lt;P&gt;To make the display of the field be in something human readable, use &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Fieldformat"&gt;fieldformat&lt;/A&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;..
| eval time = _time 
| fieldformat time = strftime(time, "%H:%M:%S")
| table time time_taken
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Of course, that just does Hours:Minutes:Seconds.  If you need full dates you can use "%y-%m-%d %H:%M%:%S".  Or day plus time could be "%d %H:%M%:%S" or .... well, I think you &lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Commontimeformatvariables"&gt;get the idea&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Let us know how it goes!&lt;/P&gt;

&lt;P&gt;Happy Splunking,&lt;BR /&gt;
Rich&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2017 23:37:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307697#M92295</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-07-16T23:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307698#M92296</link>
      <description>&lt;P&gt;This does not give me a scatter plot&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 13:14:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307698#M92296</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-17T13:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307699#M92297</link>
      <description>&lt;P&gt;Could you elaborate on what it doesn't do?  You wrote in the original post &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;..|eval time = _time | table time&lt;BR /&gt;
time_taken This gives me the scatter&lt;BR /&gt;
plot with all the data points but the&lt;BR /&gt;
time displays in epoch.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Which implied you had a scatter plot, but just didn't have the format of the time sorted out.&lt;/P&gt;

&lt;P&gt;What else is wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307699#M92297</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2020-09-29T14:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307700#M92298</link>
      <description>&lt;P&gt;Yes I have the scatterplot with my code. But after using your code the scatter plot chart has all the values at 0. and the x axis is not time any more it is some number 20,30,40,50&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 14:38:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307700#M92298</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-17T14:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307701#M92299</link>
      <description>&lt;P&gt;My code is nothing but the same code given in the question |eval time = _time | table time time_taken.. this when switched to scatter plot chart gives you all the individual data points. But the x axos changes to epoch&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:55:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307701#M92299</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2020-09-29T14:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307702#M92300</link>
      <description>&lt;P&gt;You are right.  Scatter charts don't seem to behave the same... &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Usually&lt;/EM&gt; you can fieldformat that stuff - it doesn't affect that the value is still in epoch, but it change the display of that field to be more human friendly.&lt;/P&gt;

&lt;P&gt;In this case, the scatter chart doesn't work.&lt;/P&gt;

&lt;P&gt;We're looking into it on Slack right now, digging around.  Your question has been brought to the attention of others and we'll see if we can figure out if this is a bug or if there's a workaround.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 19:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307702#M92300</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-07-17T19:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307703#M92301</link>
      <description>&lt;P&gt;This won't work for long duration's of time but it might get what you need if you are looking at a few hours or less.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=_internal 
| timechart count 
| eval time=_time 
|table  time count 
| fieldformat time=strftime(time, "%Y%m%d%H%M%S") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&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/3196i920EC90239BEBE13/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 20:09:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307703#M92301</guid>
      <dc:creator>MattZerfas</dc:creator>
      <dc:date>2017-07-17T20:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307704#M92302</link>
      <description>&lt;P&gt;I am looking at data at a span of months, even years.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 20:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307704#M92302</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-17T20:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307705#M92303</link>
      <description>&lt;P&gt;How granular or you wanting the data to show?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 20:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307705#M92303</guid>
      <dc:creator>MattZerfas</dc:creator>
      <dc:date>2017-07-17T20:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307706#M92304</link>
      <description>&lt;P&gt;The data is granular upto seconds.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 20:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307706#M92304</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-17T20:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307707#M92305</link>
      <description>&lt;P&gt;its basically the raw data i want to show. 'as is'&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 20:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307707#M92305</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-17T20:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307708#M92306</link>
      <description>&lt;P&gt;You are probably better off using a 3rd part viz to display that data then. Splunk native viz isn't the greatest at displaying large amounts of data points. Maybe look at importing a &lt;A href="https://d3js.org/"&gt;https://d3js.org/&lt;/A&gt; chart?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 20:43:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307708#M92306</guid>
      <dc:creator>MattZerfas</dc:creator>
      <dc:date>2017-07-17T20:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307709#M92307</link>
      <description>&lt;P&gt;A ticket has been opened.  I think I may have now convinced support there's a real problem here.  I will post back what I find.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 01:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307709#M92307</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-07-20T01:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307710#M92308</link>
      <description>&lt;P&gt;Thanks rich! This is really appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 01:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307710#M92308</guid>
      <dc:creator>howardroark</dc:creator>
      <dc:date>2017-07-20T01:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307711#M92309</link>
      <description>&lt;P&gt;Scatter Chart is suitable for numerical expression on the X axis, not suitable for expressing rich time.&lt;BR /&gt;
Therefore, I recommend using a Line Chart to try it.&lt;/P&gt;

&lt;P&gt;１． Insert Null under each row of your table.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt;
| stats values(Y_Value) as Y_Value by _time,Status
| eval {Status}=Y_Value 
| append 
    [ search &amp;lt;base search&amp;gt; 
    | stats values(Y_Value) as Y_Value by _time,Status
    | eval Y_Value =null
        ] 
| sort 0 _time,Status
| fields - Y_Value ,Status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;２． Set the graph as follows.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Graph: Line Chart
Setting: format&amp;gt; General&amp;gt; Null Values&amp;gt; select [Gaps]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&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/3197i6081AE570D9B2889/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 09:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307711#M92309</guid>
      <dc:creator>murakoshi</dc:creator>
      <dc:date>2018-08-24T09:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307712#M92310</link>
      <description>&lt;P&gt;Nice workaround, @murakoshi.&lt;/P&gt;

&lt;P&gt;For what it's worth, there is now an Enhancement Request (SPL-152883) in place to make Scatterchart work with time.  For some reason, they decided this behavior wasn't actually a bug but still needed fixing some day.  &lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307712#M92310</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-08-24T13:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot for time x-axis and numbered Y axis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307713#M92311</link>
      <description>&lt;P&gt;Sorry for having forgotten to update this!  &lt;/P&gt;

&lt;P&gt;Splunk support decided this behavior isn't actually a bug.  There is now an Enhancement Request (SPL-152883) in place to make Scatterchart work with time.  &lt;/P&gt;

&lt;P&gt;Which means - maybe some day it'll work?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 13:13:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Scatter-Plot-for-time-x-axis-and-numbered-Y-axis/m-p/307713#M92311</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-08-24T13:13:15Z</dc:date>
    </item>
  </channel>
</rss>

