Page 1 of 1

Rain not showing in charts

PostPosted: Sat Jul 30, 2022 3:03 am
by Londonmark
I'm probably doing something wrong but can't figure out what. Rain is showing in my forecast but not on my charts. See attachment. Sunday is Day 2 and should be showing 2.64mm of rain.

Re: Rain not showing in charts

PostPosted: Sat Jul 30, 2022 5:37 am
by DaveL17
How are you getting the data from the Weather Forecast device to the Matplotlib Chart device? Are you saving the data to a CSV file using the Matplotlib CSV Engine or are you saving it a different way? The Matplotlib plugin should be able to pick up that data when creating a Weather Forecast chart, but not when using the data "straight up".

Re: Rain not showing in charts

PostPosted: Sat Jul 30, 2022 2:48 pm
by Londonmark
Just selecting the fantastic weather forecast daily forecast device as the source device in the weather forecast composite device. Was sure I’d done that on my previous installation without any problems.

Re: Rain not showing in charts

PostPosted: Sat Jul 30, 2022 6:11 pm
by DaveL17
Okay, that's helpful. Thanks. Let me do some digging and get back to you.

Re: Rain not showing in charts

PostPosted: Sat Jul 30, 2022 6:27 pm
by DaveL17
It looks like the precipitation (line) is working but the precipitation (bar) is not. I'll look into it.

Sorry for the ugly chart. :)

chart_forecast_composite.png
chart_forecast_composite.png (56.71 KiB) Viewed 3240 times

Re: Rain not showing in charts

PostPosted: Sun Jul 31, 2022 7:53 am
by DaveL17
I think I have a fix for this. The short version of the story is that Matplotlib (the updated version we're using now) treats aspects of line charts differently than bar charts. The data are plotting, you just can't see them. :wink:

I need to test the fix and then I'll roll out an update.

chart_forecast_composite.png
chart_forecast_composite.png (52.72 KiB) Viewed 3210 times

Re: Rain not showing in charts

PostPosted: Sun Jul 31, 2022 4:14 pm
by Londonmark
Thanks. Looks promising.

Re: Rain not showing in charts

PostPosted: Tue Aug 02, 2022 5:02 am
by DaveL17
I've released an update to the plugin that should address this (and other) issues. There's also a few minor enhancements. Please let me know if you see anything that doesn't seem quite right.

Here is a link to the release notes.
You can download the update here.

Re: Rain not showing in charts

PostPosted: Tue Aug 02, 2022 5:10 am
by Londonmark
Thanks Dave. Will do.

Re: Rain not showing in charts

PostPosted: Sat Aug 06, 2022 3:16 am
by Londonmark
One weirdness. On the week ahead forecast, day 1 is showing 100% probability of rain. Sadly (given parched conditions of the UK) the real figure is 0.

Re: Rain not showing in charts

PostPosted: Sat Aug 06, 2022 5:46 am
by DaveL17
Weird. I can't think of a reason why a zero would show up as 100 on one day and not the next. I'll take a deep dive on that part of the code and see if I can spot anything. It's not something I've seen.

Re: Rain not showing in charts

PostPosted: Sat Aug 06, 2022 7:13 am
by DaveL17
I'm not seeing anything in the code that might cause this. The only bit that seems a potential culprit is where I do a little bit of fudging when *all* the precipitation values are zero (which Matplotlib doesn't like for some reason). If the problem persists, let me know and I'll whip up a special version of the plugin so that we might spot where the problem is. TBH, it could be my plugin, but it could also be Matplotlib itself--hence the trickery above.

Re: Rain not showing in charts

PostPosted: Sat Aug 06, 2022 10:40 am
by Londonmark
It's been going on for a couple of days. May not have been something I've ever noticed before if the cause is what you say - the idea of 7 days in a row with zero probability of rain is pretty unheard of in London (until now). But actually looking at the latest chart (and the one I attached) there are some non-zero values a week or so out.

Re: Rain not showing in charts

PostPosted: Sat Aug 06, 2022 3:36 pm
by DaveL17
We might have to do some investigating then, as I coerced the data to be at least somewhat reflective of your data, and I didn't get the same erroneous result.