<?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: line plot for time series over many samples in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/734034#M91509</link>
    <description>&lt;P&gt;Thank you both&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3911"&gt;@Chris_Kirchberg&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;, exactly what I was looking for!&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 05:32:47 GMT</pubDate>
    <dc:creator>asj</dc:creator>
    <dc:date>2024-03-13T05:32:47Z</dc:date>
    <item>
      <title>line plot for time series over many samples</title>
      <link>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733404#M91481</link>
      <description>&lt;P&gt;Hi, I'm wondering if there is an efficient JMP way to do multiple line plots from a data table of time series data from several samples.&lt;BR /&gt;So, my data table looks like this:&lt;/P&gt;&lt;PRE&gt;   index            datetime sampleID  value
0     93 2024-03-12 00:09:47        B  0.852
1     46 2024-03-12 00:18:36        A  0.377
2     29 2024-03-12 00:50:22        B  0.049
3     99 2024-03-12 01:11:40        B  0.441
4     52 2024-03-12 01:12:09        A  0.237
5     66 2024-03-12 01:26:29        A  0.607
6     28 2024-03-12 01:27:56        A  0.669
7     64 2024-03-12 01:33:11        A  0.074
8     16 2024-03-12 01:52:59        B  0.964
9     55 2024-03-12 01:56:17        A  0.960&lt;/PRE&gt;&lt;P&gt;- sampleID gives the sample ID, in this example A or B. In reality there could be &amp;gt;100 unique sampleIDs&lt;BR /&gt;- datetime gives the timestamp of each measurement. this is unique for each row.&lt;BR /&gt;- value is the measured value&lt;BR /&gt;- the number of rows for each sample may be different&lt;BR /&gt;&lt;BR /&gt;and I want to produce a time series line plot like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asj_1-1710262284538.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62126iE4A397DC8FA80401/image-size/medium?v=v2&amp;amp;px=400" role="button" title="asj_1-1710262284538.png" alt="asj_1-1710262284538.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In python I would do it like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#example on how to do it in python
import pandas as pd
import datetime, random
N = 100
datetime_rand = [datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0) + datetime.timedelta(seconds=random.randint(0, 86400)) for _ in range(N)]
df = pd.DataFrame( dict( datetime = datetime_rand, sampleID = np.random.choice(["A", "B"], N), value = rand(N)))
df = df.sort_values(by="datetime").reset_index()
#now we have this kind of dataframe
#   index            datetime sampleID  value
#0     69 2024-03-12 00:04:06        A  0.027
#1     96 2024-03-12 00:05:33        B  0.248
#2     16 2024-03-12 00:18:06        B  0.276
#3     81 2024-03-12 00:34:32        A  0.737
#4     27 2024-03-12 01:01:49        A  0.804
#...

#then I want to visuzalize the raw data with line plots:
for sampleID, group in df.groupby("sampleID"):    
    if sampleID == "A": plotspec = "bo-"
    else: plotspec = "ro-"
    plot( group.datetime, group.value, plotspec)&lt;/PRE&gt;&lt;P&gt;and I want to do the same in JMP. The next step in my analysis workflow is to do some binning of the data based on the timestamp and visualize that data through parallel plots, but plotting the rawest form of the data with datetime as the x axis is oftentimes necessary.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 16:56:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733404#M91481</guid>
      <dc:creator>asj</dc:creator>
      <dc:date>2024-03-12T16:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: line plot for time series over many samples</title>
      <link>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733468#M91482</link>
      <description>&lt;P&gt;In Graph Builder, drag Date time to the X axis, Value to the Y axis and Sample ID to the Overlay drop zone.&lt;/P&gt;
&lt;P&gt;The right click on the graph and select&amp;nbsp; Add=&amp;gt;Line&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="txnelson_0-1710265182505.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62136i24166434B9C53683/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1710265182505.png" alt="txnelson_0-1710265182505.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 17:39:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733468#M91482</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-12T17:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: line plot for time series over many samples</title>
      <link>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733473#M91483</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/55532"&gt;@asj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a simple way. Using Graph Builder from the Graph menu. Value on Y, Datetime on X and Sample ID in Overlay. &amp;nbsp;The rest is a matter of the graph types select on the top (Control Click in PC/Shift Click on Mac on multiple types to get what you want). Something like this:&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="Chris_Kirchberg_0-1710265920247.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62138iD8A803A189CC2D1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Kirchberg_0-1710265920247.png" alt="Chris_Kirchberg_0-1710265920247.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Will this work for you? &amp;nbsp;There are more details in the Help Menu about graphing using Graph Builder. There are some graph types that are easy to do in Graph Builder that might take more work using Python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 17:53:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733473#M91483</guid>
      <dc:creator>Chris_Kirchberg</dc:creator>
      <dc:date>2024-03-12T17:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: line plot for time series over many samples</title>
      <link>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733475#M91484</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;beat me to it again. :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 17:54:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/733475#M91484</guid>
      <dc:creator>Chris_Kirchberg</dc:creator>
      <dc:date>2024-03-12T17:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: line plot for time series over many samples</title>
      <link>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/734034#M91509</link>
      <description>&lt;P&gt;Thank you both&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3911"&gt;@Chris_Kirchberg&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;, exactly what I was looking for!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 05:32:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/line-plot-for-time-series-over-many-samples/m-p/734034#M91509</guid>
      <dc:creator>asj</dc:creator>
      <dc:date>2024-03-13T05:32:47Z</dc:date>
    </item>
  </channel>
</rss>

