Fill In underneath line Chart?

Posted on
Wed Mar 25, 2020 5:41 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Fill In underneath line Chart?

Hi Dave,
Hope you are keeping safe and well?

Here in the UK (as in other places) we are in "Lock-down" and I am taking the opportunity to revamp my motion detection "algorithms" - something I have been intending to do for years!

I am using timers so that is soon as motion is detected, it kicks off a 2 minute timer that gets restarted if motion continues. The result of my scripts is that a variable "MOTION_ACTIVE" is updated with true when motion starts and false when it ends. On demand, I create a csv file with timestamps and 1 for true and 0 for false e.g.:
Code: Select all
2020-03-25 09:19:46.098368,0
2020-03-25 09:20:01.220973,1
2020-03-25 09:24:11.801237,0
2020-03-25 09:31:04.650543,1
2020-03-25 10:01:06.151857,0
2020-03-25 10:15:05.272432,1


I then create a graph using the following options:
options.png
Options
options.png (278.55 KiB) Viewed 2582 times

This gives the result as follows:
nofill.png
No Fill
nofill.png (332.73 KiB) Viewed 2582 times

What I want to do is to fill in the area under the line (so it appears like a bar graph) to better show when motion is detected. If I check the option Fill? then I get this result:
fill.png
Fill
fill.png (354.42 KiB) Viewed 2582 times

I suspect I haven't set the correct options to achieve what I want, can you possibly point me in the correct direct? :)

Posted on
Wed Mar 25, 2020 6:25 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fill In underneath line Chart?

Hi Jon - healthy and safe here--hope you and yours are likewise.

I had to go back and reconfirm, but I don't believe it's possible to do what you want with the version of Matplotlib that Apple ships with. I suspect that we'll be able to rectify this when Apple makes Python 3.x the default (which will hopefully include a newer version of Matplotlib along with it).

I would refrain from the impulse to upgrade Matplotlib on your machine as I'm nearly certain that the plugin won't work with newer versions.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Mar 25, 2020 7:11 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Fill In underneath line Chart?

DaveL17 wrote:
Hi Jon - healthy and safe here--hope you and yours are likewise.

Yes, we are fine so far. :)

DaveL17 wrote:
I had to go back and reconfirm, but I don't believe it's possible to do what you want with the version of Matplotlib that Apple ships with. I suspect that we'll be able to rectify this when Apple makes Python 3.x the default (which will hopefully include a newer version of Matplotlib along with it).

I would refrain from the impulse to upgrade Matplotlib on your machine as I'm nearly certain that the plugin won't work with newer versions.

Ok - Thanks for checking, I will make do with the line version then. :)

Posted on
Wed Mar 25, 2020 8:00 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Fill In underneath line Chart?

DaveL17 wrote:
I suspect that we'll be able to rectify this when Apple makes Python 3.x the default (which will hopefully include a newer version of Matplotlib along with it)..


I don't think that will ever happen. I think Apple will just stop including Python at all. Which means using a third-party installer, and I have no idea how that's going to affect Indigo.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Mar 25, 2020 9:08 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fill In underneath line Chart?

I think Matt and Jay will try to cover that if need be. Not sure how it will work, but I know they’re thinking about it.


Sent from my iPhone using Tapatalk Pro

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Mar 25, 2020 11:07 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Fill In underneath line Chart?

Yes, we're most likely moving to a world where we have to bundle Python with Indigo... :roll:

As we've been discussing in another forum topic, a lot of users use old hardware, some of which won't make the jump to Catalina (the first release to include Python3). And given that Catalina is still pretty buggy, I'm not sure I'd want to encourage users to do so even if they could (I just reverted my development system back to Mojave because of Catalina's bugs).

With respect to Python, our options (in no particular order) are this:

  1. Include Python3 with Indigo
  2. Require customers to install Python3 themselves
  3. Restrict Indigo (Server) to Catalina+
  4. Live with Python2 until Apple stops shipping OS versions that don't include it

The problem with #1 is that it adds significant development/QA/release time for every Indigo release, and a particularly large development effort for the first release that contains it. It also means that it'll be our responsibility to keep up with Python security updates. All of this effort will result in fewer features in any given release, and likely longer delays between releases when we've been trying really hard to decrease time between releases.

The problem with #2 is there are even more testing issues since we can't easily restrict customers to specific releases of Python 3, so we'd have to test on a large variety of configuration alternatives (Python 3.6, 3.7, 3.8, etc). That is an ENORMOUS undertaking - we have a hard enough time testing all the OS varieties that we currently support. Can you imagine adding another dimension of testing to each OS release test?

The problem with #3 is pretty evident: it puts Indigo out of reach for some customers, it relies on Apple to continue to bundle Python, and Catalina is already a hot mess of bugs that probably won't get fixed (at least until the next release, which if history shows us anything will likely be as bad or worse than Catalina).

The problem with #4 is that more and more libraries won't work with Python 2 as time goes by, making the development of new plugins harder or impossible. And again it relies on Apple continuing to bundle Python, which given Python 2's unsupported state seems even less likely to continue (in favor of Python 3).

All in all, we're really in quite the conundrum here as none of the options are particularly good. We've been going with #4, but there is some undetermined point in the future where that is just no longer an option.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Mar 25, 2020 12:47 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Fill In underneath line Chart?

I vote for option 5!


Sent from my iPhone using Tapatalk Pro

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests