timestamps, scatter plots

Bug reports, feature requests and other feedback.
GSAS
Posts: 2
Joined: Thu Aug 05, 2021 12:12 pm

Re: timestamps, scatter plots

Post by GSAS »

Dear Gustaf,

I have only recently discovered your Flow CSV Viewer and am delighted with its performance and functionality. I promise to buy the editor soon, but for now I just want to view existing CSV files.

My wish/suggestion (if not already in the pipeline):
Is it possible to use a time column via "Shown On X Axis" not only to label the X-axis, but also to set the display to be "time-correct" and thus compress or stretch the even row division depending on the time interval?
Many thanks in advance!

Best regards and keep up the good work...
Waveworks
Posts: 153
Joined: Thu Sep 05, 2019 1:05 pm

Re: timestamps, scatter plots

Post by Waveworks »

Hello and thank you for your kind words! I know what you mean, and this is indeed in the pipeline. However it has turned out to be rather complicated because of the intricate caching and optimizations that make painting fast on large data. I actually need to rewrite most of the painting algorithms, and I'm afraid I can't say when this will happen. Hope you can live with the current solution for now!

Best regards,
Gustaf
GSAS
Posts: 2
Joined: Thu Aug 05, 2021 12:12 pm

Re: timestamps, scatter plots

Post by GSAS »

Hi Gustaf,

thanks for the quick answer - I will wait patiently until the function is built in and use the viewer as well as the editor intensively in the current version.
I wish you, not unselfishly ;) , a speedy success!

Best regards,
Ralf from GSAS Automation
david_bl
Posts: 4
Joined: Thu Jun 25, 2020 9:47 am

Re: timestamps, scatter plots

Post by david_bl »

Hi Gustaf,
Thank you for this functionality. It works great, and makes the tool a lot more practical. It's a great thing to see the tool improve over time !
The next thing could be x delta measurement with the cursors ?

Thanks again for your work !
David
Waveworks
Posts: 153
Joined: Thu Sep 05, 2019 1:05 pm

Re: timestamps, scatter plots

Post by Waveworks »

Hello David, very glad to know that you find the improvements useful! With "x delta measurement with the cursors", do you mean the same as 2nd data cursor suggested by another user?
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

Re: timestamps, scatter plots

Post by MrFlow256 »

Another new user here - I am using Flow to visualise stock trading data so the "show on X axis" feature is so useful to me :)

I got it working by trial and error but am a little unsure how to use it in multiple groups. I was wondering to use my timestamp column in two or more groups but it seems you can only put each column in one group? The docs say each group has a separate X-axis but when I scroll/zoom all groups appear 'locked' so possibly this is a non issue or I am just confused...

A couple of thoughts from a new user:
  • As someone already mentioned I think, being able to display a timestamp in more human-readable form might be really helpful. My timestamp are in Unix seconds (it's 1632847967 right now) and that's not easy to translate to date. Maybe we could apply an expression to the selected X-axis to 'transform' it into what is displayed and add some date/time conversion functions?
  • When I hover over an individual data-point, it shows me the value and the index e.g. column5[12345] = 100.4, but you don't get a readout of the X-axis value. I can see you can place the cursor to see the X-value, but not show it for the point under the mouse
  • Subdivisions on the X-axis seem to be a little odd. Sometimes they are nicely spaced, others very far apart. And they seem not to be evenly spaced in all cases:
    Screenshot 2021-09-28 180703.png
    Screenshot 2021-09-28 180703.png (26.73 KiB) Viewed 14109 times
    Here there are only 3 divisions shown (140, 150, 160) and for some reason the gap between 140 and 150 is far smaller than 150-160. Probably there are far fewer data points but should that matter?
Thanks for any thoughts :)
Waveworks
Posts: 153
Joined: Thu Sep 05, 2019 1:05 pm

Re: timestamps, scatter plots

Post by Waveworks »

Hello! My answers to your four questions/comments below:
  • Yes, a column/variable can only be shown in one group at a time. Would it be useful for you to show the same variable in multiple groups? As for the coordinate systems, all groups share the same X axis, so there is no way to unlock them from each other. I'm afraid the documentation is a bit unclear about this - it says "Each group has its own coordinate system", which is meant to be understood as "each group has its own plot space", but not as "each group has an independent coordinate system that can be freely zoomed and scrolled". I'll try to find a better formulation and update the docs to avoid confusion.
  • As a matter of fact, such conversion functions do exist: Given a timestamp x in unix seconds, the functions str_date(x), str_time(x) and str_datetime(x) return the date, time and a concatenation of the two, respectively, in human-readable formats. Note: These functions will be replaced with a more flexible solution in the future, so with a future app update, these functions may no longer work. This is the reason for why they're not documented.
  • Good point, I'll fix that for the next version!
  • I think what you're seeing is the same effect that others (including Ralf from GSAS) have pointed out: Data is always plotted against sample number (i.e. row number), while "Show on X axis" only labels the X axis - it doesn't generally plot data against this variable. For data sampled with a regular sample time, this amounts to the same thing, but with irregularly sampled data as in your case, you'll see the effect that you mention. As I wrote in a previous post, plotting data against a variable is in the pipeline, but unfortunately pretty difficult to implement if I also want to maintain the fast responsiveness on large data, so I can't say when I can release this function.
Hope this clears things up a bit!
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

Re: timestamps, scatter plots

Post by MrFlow256 »

Since the same variable is used as x-axis in all groups that makes sense. I think having variables in multiple groups would be handy, but you can workaround with a formula e.g. x = column2 so it doesn't seem very important?

OK, I hadn't realised that's what Ralf, etc, had meant. This makes total sense. "Linear x-axis" would certainly be useful, if/when you can add it but I can see that's not a trivial thing. Although would a linear x-axis rather than true x-y plot be slightly simpler?

Many thanks.
Waveworks
Posts: 153
Joined: Thu Sep 05, 2019 1:05 pm

Re: timestamps, scatter plots

Post by Waveworks »

True there is that workaround, but I think it would be easy to implement, so I think I'll do it!

I'm not sure I understand the difference between "linear x-axis" and "true x-y plot" - can you elaborate? But in any case the problem lies in stretching the X-axis so it's linear to anything else than sample (row) number. If you're curious about the technical details, the problem is that I need to be able to determine the sample range covered by a single pixel on the screen in constant time. If I can assume that the x coordinate is linear to the sample number, finding the first and last sample numbers for a given x coordinate is just a simple multiplication s1 = x * scaleX and s2 = (x + 1) * scaleX - 1, where scaleX is the X zoom level in samples per pixel. With an x-y plot, this assumption no longer holds and as a consequence I need to rewrite A LOT. :)
MrFlow256
Posts: 15
Joined: Tue Sep 28, 2021 4:43 pm

Re: timestamps, scatter plots

Post by MrFlow256 »

Yeah I can see that being tricky!

In my case the timestamp always increases and is an int, so I could potentially pad my generated dataset to make sure there is a row at every value of x, but in reality for most of the charts I look at gaps are rare so this is not a critical feature.
Post Reply