Chart Not Drawing

Posted on
Sat Oct 24, 2020 4:32 am
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Chart Not Drawing

Yeah, I think that's all part of the same bug. According to the developers, this issue has been fixed in newer versions of matplotlib-- we're using a much older version that ships with our machines.

Try this updated version of the plugin which includes the new setting to force the chart to display leading and/or trailing zero bars. This is a pre-release build that includes other refinements so you may see a minor bug unrelated to this issue. Please let me know how it works for you.

Screen Shot 2020-10-24 at 5.27.14 AM.png
Screen Shot 2020-10-24 at 5.27.14 AM.png (31.98 KiB) Viewed 457 times

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

[My Plugins] - [My Forums]

Posted on
Sat Oct 24, 2020 8:40 am
jltnol offline
Posts: 625
Joined: Oct 15, 2013

Re: Chart Not Drawing

Downloaded and installed.

I'll know how it works in a day or two.

Thanks!

Posted on
Sun Oct 25, 2020 9:50 pm
jltnol offline
Posts: 625
Joined: Oct 15, 2013

Re: Chart Not Drawing

So the first pic are the CVS values, and the 2nd is the chart drawn with the new option checked.
Attachments
Screen Shot 2020-10-25 at 10.44.37 PM.png
Current CVS Values
Screen Shot 2020-10-25 at 10.44.37 PM.png (298.58 KiB) Viewed 424 times
Screen Shot 2020-10-25 at 10.38.49 PM.png
Chart with New option checked
Screen Shot 2020-10-25 at 10.38.49 PM.png (80.46 KiB) Viewed 424 times

Posted on
Mon Oct 26, 2020 4:43 am
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Chart Not Drawing

Aha. I made the change to control for the number of bars based on the number of observations in the data file. Obviously, that's not going to work here because each data file is one observation long. To be honest, I never envisioned data being provided quite this way. The "easy" fix would be to provide all the data in one CSV file, but there may be a way for me to work around this. Please stand by.

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

[My Plugins] - [My Forums]

Posted on
Thu Oct 29, 2020 1:09 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Chart Not Drawing

Wanted to give you an update to make sure you didn't think I was ignoring you.

I may be on to a solution, but I still need to do some regression testing to make sure that I haven't designed something that will work for you but not for everybody else. :D

chart_bar_zero_bar_test.png
chart_bar_zero_bar_test.png (10.53 KiB) Viewed 392 times

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

[My Plugins] - [My Forums]

Posted on
Sun Nov 01, 2020 7:07 am
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Chart Not Drawing

Looks like my optimism was unfounded. Unfortunately, given the large number of possible inputs, it looks pretty improbable that I'll be able to code around this Matplotlib bug. Looks like the best bet would be to adjust your scripts to change how zero values are handled. You should continue to set zero values to something super small, like '1.0e-06' or '0.000001'. I'll be changing the way that the Show Zero Bars setting works and will have the plugin literally change the zero values for you.

Sorry I couldn't come up with a better solution.

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

[My Plugins] - [My Forums]

Posted on
Tue Nov 03, 2020 1:01 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Chart Not Drawing

I have posted a pre-release of the zero bar fix that should address this issue.

https://forums.indigodomo.com/viewtopic.php?f=219&t=17349&p=196562#p196562

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

[My Plugins] - [My Forums]

Posted on
Thu Nov 12, 2020 11:17 am
jltnol offline
Posts: 625
Joined: Oct 15, 2013

Re: Chart Not Drawing

Hey Dave

Sorry for the late reply.

Nothing to worry about... I've gotten things to write as 0.01, and that pretty much works for me.

However, I could EASILY put all my data into one cvs file, but don't have the python chops to make that happen. Here is the code you suggested I use to create my four files:
Code: Select all
csv_path = '/Users/bradford/MatPlotLib/'  # put your CSV Engine data path here
values = {
    'RainToday': ('1970-01-01 00:00:00.000000,', indigo.variables[1852577407].value),  # change these variable ids to match yours
    'RainYesterday': ('1970-01-02 00:00:00.000000,', indigo.variables[35080668].value),
    'RainThisWeek': ('1970-01-03 00:00:00.000000,', indigo.variables[986779847].value),
    'RainThisMonth': ('1970-01-04 00:00:00.000000,', indigo.variables[1169660509].value),
   }

for key in values.keys():

    with open(csv_path + key + ".csv", 'w') as outfile:
        outfile.write("Timestamp," + key + "\n")
        outfile.write(values[key][0] + values[key][1])



I've tried several different ways to combine the value from the 4 variables into a single CVS file, but this is way past my understanding and ability. I've given thought to ways to create a new CVS Engine to gather those 4 values, but anyway I slice it, I'm still ending up with 4 different CVS files. In my perfect world, a trigger would grab those values from the 4 variables and put them into a single CVS file, and subsequent trigger events would replace the values, not add more data to the CVS file.

Regardless, thanks again so much for taking time to look into this for me.


JT

Posted on
Thu Nov 12, 2020 3:36 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Chart Not Drawing

HI JT - the latest revisions to that part of the code should handle the zero data issue right out of the box.

That said, you could still combine all the data into one file if you wanted to. If that's what you want to do, I could help gin up the script to make that happen, but that would force all the bars to be the same color (they would all be bar 1 data).

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

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest