matplotlib - error setting axis limits for y1

Posted on
Sat May 04, 2019 9:43 am
bsp9493 offline
Posts: 129
Joined: Nov 30, 2017
Location: Kelowna, BC

matplotlib - error setting axis limits for y1

Matplotlib Debug [mdailyWeather] prefs cleaned.
Matplotlib [10dayForecast] chart updated successfully.
Matplotlib Warning [mdailyWeather] Error setting axis limits for Y1. Will rely on Matplotlib to determine limits.
Matplotlib Warning [mdailyWeather] chart updated with errors. See plugin log for more information.
Matplotlib Warning [pool temp trends] Error setting axis limits for Y1. Will rely on Matplotlib to determine limits.
Matplotlib Warning [pool temp trends] chart updated with errors. See plugin log for more information.
Matplotlib [weatherAlert] chart updated successfully.
Matplotlib ==================== Redraw Charts Now Menu Action Complete ====


was playing with some settings, noticed I can mirror y values on right axis

checked the setting, also checked keep the other y.

didn't like it, so I unchecked both mirroring related boxes, now I get the above error when I try to redraw the charts.

Your help would be appreciated.

Thanx

dave

Posted on
Sat May 04, 2019 4:04 pm
DaveL17 offline
User avatar
Posts: 5000
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: matplotlib - error setting axis limits for y1

Hi Dave -- sorry you're having trouble. Take a look at the Y axis limits settings for the chart device. The plugin is saying that there's something amiss with those settings.

Screen Shot 2019-05-04 at 5.00.36 PM.png
Screen Shot 2019-05-04 at 5.00.36 PM.png (40.58 KiB) Viewed 312 times

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

[My Plugins] - [My Forums]

Posted on
Sat May 04, 2019 9:57 pm
bsp9493 offline
Posts: 129
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: matplotlib - error setting axis limits for y1

Did that... they are both set to NONE...

Interesting, if i set limits with actual numbers, error goes away.

Further investigation ... appears a data point i removed, ie not available in the csv, still shows in the device /chart as a selection

Posted on
Sun May 05, 2019 4:32 am
DaveL17 offline
User avatar
Posts: 5000
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: matplotlib - error setting axis limits for y1

bsp9493 wrote:
Further investigation ... appears a data point i removed, ie not available in the csv, still shows in the device /chart as a selection

I just want to be sure I understand. You removed a CSV source file, but that source still shows up under the device as a data source for one of the lines?

If that's the case, you should get a warning like this:
Code: Select all
   Matplotlib Warning              [Matplotlib - chart name] Error downloading CSV data: [Errno 2] No such file or directory: '/Users/dave/Documents/archive/dave from bc.csv'. See plugin log for more information.

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

[My Plugins] - [My Forums]

Posted on
Sun May 05, 2019 7:53 am
bsp9493 offline
Posts: 129
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: matplotlib - error setting axis limits for y1

image from line chart and csv engine
Attachments
Screen Shot 2019-05-05 at 6.46.43 AM.png
this is what shows as available in while defining lines in line chart
Screen Shot 2019-05-05 at 6.46.43 AM.png (21.77 KiB) Viewed 269 times
Screen Shot 2019-05-05 at 6.44.42 AM.png
these are what is defined in my data file
Screen Shot 2019-05-05 at 6.44.42 AM.png (23.49 KiB) Viewed 269 times

Posted on
Sun May 05, 2019 2:05 pm
DaveL17 offline
User avatar
Posts: 5000
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: matplotlib - error setting axis limits for y1

You can have as many CSV files in the folder as you like, and they don't have to be managed by a CSV Engine device. Whatever is in the folder will show up as a valid source.

If you have eliminated data and no longer need it, then I'd suggest deleting the files from the data folder or moving them to another location.

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

[My Plugins] - [My Forums]

Posted on
Mon May 06, 2019 12:54 pm
bsp9493 offline
Posts: 129
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: matplotlib - error setting axis limits for y1

Thank you for that...

I managed to clean out the old/changed csv files,


plug in log looks like this after a refresh, noting y1 axis limits still. As far as I can tell, all the data is positive

[10dayForecast] chart updated successfully.
2019-05-06 11:50:44.615 CRITICAL Plugin.pluginErrorHandler !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TRACEBACK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2019-05-06 11:50:44.617 CRITICAL Plugin.pluginErrorHandler !!! Traceback (most recent call last):
2019-05-06 11:50:44.617 CRITICAL Plugin.pluginErrorHandler !!! File "plugin.py", line 4458, in format_axis_y1_min_max
2019-05-06 11:50:44.617 CRITICAL Plugin.pluginErrorHandler !!! y_axis_min = y_min * (1 - (1 / y_min ** 1.25))
2019-05-06 11:50:44.618 CRITICAL Plugin.pluginErrorHandler !!! ValueError: negative number cannot be raised to a fractional power
2019-05-06 11:50:44.618 CRITICAL Plugin.pluginErrorHandler !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2019-05-06 11:50:46.049 INFO Plugin.csv_refresh_process [matPlotLibCSV] CSV data updated successfully.
2019-05-06 11:50:46.390 WARNING Plugin.processLogQueue [mdailyWeather] Error setting axis limits for Y1. Will rely on Matplotlib to determine limits.
2019-05-06 11:50:46.390 WARNING Plugin.processLogQueue [mdailyWeather] chart updated with errors. See plugin log for more information.
2019-05-06 11:50:46.904 CRITICAL Plugin.pluginErrorHandler !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TRACEBACK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2019-05-06 11:50:46.905 CRITICAL Plugin.pluginErrorHandler !!! Traceback (most recent call last):
2019-05-06 11:50:46.905 CRITICAL Plugin.pluginErrorHandler !!! File "plugin.py", line 4458, in format_axis_y1_min_max
2019-05-06 11:50:46.905 CRITICAL Plugin.pluginErrorHandler !!! y_axis_min = y_min * (1 - (1 / y_min ** 1.25))
2019-05-06 11:50:46.906 CRITICAL Plugin.pluginErrorHandler !!! ValueError: negative number cannot be raised to a fractional power
2019-05-06 11:50:46.907 CRITICAL Plugin.pluginErrorHandler !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2019-05-06 11:50:47.866 WARNING Plugin.processLogQueue [pool temp trends] Error setting axis limits for Y1. Will rely on Matplotlib to determine limits.
2019-05-06 11:50:47.867 WARNING Plugin.processLogQueue [pool temp trends] chart updated with errors. See plugin log for more information.
2019-05-06 11:50:48.607 INFO Plugin.processLogQueue [weatherAlert] chart updated successfully.
2019-05-06 11:50:48.610 INFO Plugin.refresh_the_charts_now ==================== Redraw Charts Now Menu Action Complete ====================
2019-05-06 11:51:17.061 INFO Plugin.csv_refresh_process [matPlotLibCSV] CSV data updated successfully.

Posted on
Mon May 06, 2019 3:47 pm
DaveL17 offline
User avatar
Posts: 5000
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: matplotlib - error setting axis limits for y1

That looks like a bug. What do you have as the setting for y1 axis minimum in the device configuration dialog for the mdailyWeather device and the pool temp trends device?

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

[My Plugins] - [My Forums]

Posted on
Mon May 06, 2019 4:07 pm
DaveL17 offline
User avatar
Posts: 5000
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: matplotlib - error setting axis limits for y1

If you're so inclined, I think this change should keep the error from happening.
Code: Select all
y_axis_min = y_min * (1 - (1 / abs(y_min) ** 1.25))

In this context, y_min is the minimum of the data array for the plotted element so I think it's likely that there's a negative value in there somewhere. Regardless, by using the absolute value of the number in question, the result is the same from a charting perspective, so this small change should fix things.

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

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest