I have uploaded a new prerelease under File/Test. This includes your new feature (setLocale, showDateTimeAtXAxis). You can find an example under exampleScripts\WorkerScripts\PlotWindow\plotWindowExample.js
Regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Awesome! I am still out of town (I am coming back home but will arrive at
night). But I will check the new functions as soon as I can open my PC
again tomorrow.
I will keep you posted Stefan, many thanks in advance!
I have uploaded a new prerelease under File/Test. This includes your new
feature (setLocale, showDateTimeAtXAxis). You can find an example under
exampleScripts\WorkerScripts\PlotWindow\plotWindowExample.js
The xAxis is now showing the nice dateTime format, but I have some issues.
Issue 1: missing majorTicks x Range is increased
If I increase the x Range to around 300,000 and above, the majorTicks are not get printed anymore. That was what I did (increase the x Range) if I want to see more data, for example, the last 10 minutes data received from my datalogger.
Issue2: majorTicks are not aligned with the plotted data
I've modified the plotWindowExample.js so that the data get plotted exactly on every second.
The below picture is showing the last 10 data (x Range 10,000).
As you can see from the picture below, the plotted data is not aligned with the majorTicks.
I am not a programmer, so I'm pretty sure that the mistakes are on my side, but could you please have a look?
I changed QCustomPlot because the time precision is only seconds. I think my changes causes this problems. Therefore I will revert my changes. But then the time precision will only be 1 second.
Regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have uploaded a new prerelease, which interprets the x values as seconds since epoche (the decimal places are the milliseconds).
Issue2: You cannot exactly align the x values to the x-axis because:
- you cannot add a new value exactly 1 second after the old one (it depends on the Windows sheduler)
- the x-axis labels are not aligned to seconds (try the time format hh:mm:ss:zz, then you will see it)
Regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tested the pre release and everything works great!
I tested it using the script I attached earlier, with only small modification (previously the x values were in millisecond, now are in seconds).
Also I really like that the x Range values is much more make sense (previously I have to multiply the value by 1000 - because previosly the x axis were in milliseconds).
Issue1 is solved.
Regarding Issue 2, I just found out that if we input x Range values between 8 to 10 8 to 15, the major ticks become inconsistent. Instead of printing on every second, sometimes it prints at half second (i.e. 00:00:00:500). It creates impression that the data did not get printed exactly on that second.
Previously it was not so obvious becasuethe major tick format I used did not show the sub-seconds. As you said, after using the hh:mm:ss:zz format, then it become obvious.
Please see attached picture.
But well, I think it's only small issues (or maybe it's an automatic feature of QCustomPlot??), overall for me chart works great and fits my needs.
Hi Stefan,
First of all thank you very much for sharing your great work.
My request is related to plotWindow / plotWidget script.
I have successfully plotting the data I received periodically from a datalogger (every 10 seconds).
At the moment I want to format the X-axis in nice date & time format, something like hh:mm or 1-Jan-19.
I think the QCustomPlot is able to do that, but it seems that feature is not enabled in your project.
Could you please implement that feature in your project?
Thanks & best regards,
Iqbal
Hi Iqbal,
this is no problem. I will create a prerelease (Windows?) this weekend.
Regards,
Stefan
Hi Stefan,
Really appreciate your feedback, thank you vey much!
Yes I am on Windows.
Best regards,
Iqbal
Hi Muhammad,
I have uploaded a new prerelease under File/Test. This includes your new feature (setLocale, showDateTimeAtXAxis). You can find an example under exampleScripts\WorkerScripts\PlotWindow\plotWindowExample.js
Regards,
Stefan
Hi Stefan,
Awesome! I am still out of town (I am coming back home but will arrive at
night). But I will check the new functions as soon as I can open my PC
again tomorrow.
I will keep you posted Stefan, many thanks in advance!
Best regards,
Iqbal
On Sun, 20 Jan 2019 at 16.50 Stefan Zieker szieke@users.sourceforge.net
wrote:
Hi Stefan,
I've tested the prerelease.
The xAxis is now showing the nice dateTime format, but I have some issues.
Issue 1: missing majorTicks x Range is increased
If I increase the x Range to around 300,000 and above, the majorTicks are not get printed anymore. That was what I did (increase the x Range) if I want to see more data, for example, the last 10 minutes data received from my datalogger.
Issue2: majorTicks are not aligned with the plotted data
I've modified the plotWindowExample.js so that the data get plotted exactly on every second.
The below picture is showing the last 10 data (x Range 10,000).
As you can see from the picture below, the plotted data is not aligned with the majorTicks.
I am not a programmer, so I'm pretty sure that the mistakes are on my side, but could you please have a look?
Appreciate your help in advance,
Cheers,
iqbal
Last edit: Muhammad Iqbal 2019-01-21
Hi Muhammad,
I changed QCustomPlot because the time precision is only seconds. I think my changes causes this problems. Therefore I will revert my changes. But then the time precision will only be 1 second.
Regards,
Stefan
Hi Stefan,
For my current aplication, 1 second precision is enough.
Not sure but maybe other users prefer better precision...? Sorry for causing the hickup.
Best regards,
Iqbal
Last edit: Muhammad Iqbal 2019-01-22
Hi Muhammad,
I have uploaded a new prerelease, which interprets the x values as seconds since epoche (the decimal places are the milliseconds).
Issue2: You cannot exactly align the x values to the x-axis because:
- you cannot add a new value exactly 1 second after the old one (it depends on the Windows sheduler)
- the x-axis labels are not aligned to seconds (try the time format hh:mm:ss:zz, then you will see it)
Regards,
Stefan
Hi Stefan,
Sorry somehow my gmail app didn't notify me that I have new post on this thread.
I will test tonight and report by soonest.
Best regards,
Iqbal
Hi Stefan,
I've tested the pre release and everything works great!
I tested it using the script I attached earlier, with only small modification (previously the x values were in millisecond, now are in seconds).
Also I really like that the x Range values is much more make sense (previously I have to multiply the value by 1000 - because previosly the x axis were in milliseconds).
Issue1 is solved.
Regarding Issue 2, I just found out that if we input x Range values between
8 to 108 to 15, the major ticks become inconsistent. Instead of printing on every second, sometimes it prints at half second (i.e. 00:00:00:500). It creates impression that the data did not get printed exactly on that second.Previously it was not so obvious becasuethe major tick format I used did not show the sub-seconds. As you said, after using the hh:mm:ss:zz format, then it become obvious.
Please see attached picture.
But well, I think it's only small issues (or maybe it's an automatic feature of QCustomPlot??), overall for me chart works great and fits my needs.
Best regards,
Iqbal
Last edit: Muhammad Iqbal 2019-01-29
Hi Muhammad,
yes you are right. This is a behavior of QCustomPlot, which I cannot change.
Thx for your response.
Best regards,
Stefan