Feature Requests

Posted on
Sat Sep 09, 2017 10:49 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Feature Requests

I have two small feature requests:

1. Convert boolean data to 0/1 so it can be plotted. Would be nice if it also handled several of the common text-boolean-equivalents (up/down, on/off, locked/unlocked, true/false, etc).

2. Linear transformations with multiplier and offset (e.g. <datum> * X + Y). Offset would be especially helpful for plotting multiple boolean values. Multiplier is nice for unit conversion or just getting two plotlines in the same neighborhood if actual value is less important than trend or correlation.

I made this plot with variables and a whole mess of triggers, but it would be cleaner if it could be done in the plugin.

Thanks.
Attachments
Screen Shot 2017-09-09 at 11.36.08 PM.png
Screen Shot 2017-09-09 at 11.36.08 PM.png (442.27 KiB) Viewed 3519 times

Posted on
Sun Sep 10, 2017 5:48 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

kmarkley wrote:
I have two small feature requests:

1. Convert boolean data to 0/1 so it can be plotted. Would be nice if it also handled several of the common text-boolean-equivalents (up/down, on/off, locked/unlocked, true/false, etc).

2. Linear transformations with multiplier and offset (e.g. <datum> * X + Y). Offset would be especially helpful for plotting multiple boolean values. Multiplier is nice for unit conversion or just getting two plotlines in the same neighborhood if actual value is less important than trend or correlation.

I made this plot with variables and a whole mess of triggers, but it would be cleaner if it could be done in the plugin.

Thanks.

HI - thanks for using the plugin.

These are both great suggestions, and I will add them to the list. I've been doing some house cleaning of all my plugins and have plans to take a deep dive on Matplotlib and on OWServer next.

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

[My Plugins] - [My Forums]

Posted on
Tue Jan 30, 2018 1:46 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

kmarkley wrote:
I have two small feature requests:

1. Convert boolean data to 0/1 so it can be plotted. Would be nice if it also handled several of the common text-boolean-equivalents (up/down, on/off, locked/unlocked, true/false, etc).

2. Linear transformations with multiplier and offset (e.g. <datum> * X + Y). Offset would be especially helpful for plotting multiple boolean values. Multiplier is nice for unit conversion or just getting two plotlines in the same neighborhood if actual value is less important than trend or correlation.

I made this plot with variables and a whole mess of triggers, but it would be cleaner if it could be done in the plugin.

Thanks.

It's taken me longer than I expected, but both of these suggestions will be in the next update.

I've added a converter so that these values will be converted to chartable boolean values:
Code: Select all
        converter = {'true': 1,
                     'false': 0,
                     'open': 1,
                     'closed': 0,
                     'on': 1,
                     'off': 0,
                     'locked': 1,
                     'unlocked': 0,
                     'up': 1,
                     'down': 0,
                     '1': 1,
                     '0': 0,
                     '-99': 'NaN'}

A note on the last one. -99 is a value used in the WUnderground plugin to denote a "nonsense" value. NaN (Not a Number) should now be skipped rather than charted as -99. If you have other state values not reflected above, please let me know as they're easily added.

I've added linear transformations to the line chart device type (which seems like the only one needing it, but am open to other types) which will allow individual adjustments to be made to each line based on simple math expressions. So, for example, line 1 could be plotted as real and line two could be plotted as [ <datum> * X ] or [ <datum> + Y ] or [ <datum> * X + Y ]. The adjustment should be able to handle all "normal" mathematical operations but I expect [addition, subtraction, multiplication, division, and exponents] to be the most common. So your chart above should be easily recreated using:

Line 1
Line 2 + 2
Line 3 + 4
Line 4 + 6

Thanks again for the great suggestions. Hang tight for a forthcoming update after some more regression testing (there's lot's more changes under the hood.)

EDIT: better example for adjustment factor. See example below.

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

[My Plugins] - [My Forums]

Posted on
Tue Jan 30, 2018 9:10 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Just a quick follow-up. Testing goes well. This chart was created using only the (forthcoming) line charting device type. Obviously charting the same data four times, but with adjustments applied.

chart_binary_line.png
chart_binary_line.png (9.72 KiB) Viewed 3273 times

Line 1 + 1 (to move it off the x axis)
Line 2 + 3
Line 3 + 5
Line 4 + 7

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

[My Plugins] - [My Forums]

Posted on
Tue Apr 10, 2018 2:32 pm
Athassel offline
Posts: 7
Joined: Mar 26, 2014
Location: Bray, Ireland

Re: Feature Requests

I love both of these new features!
Any chance to be able to plot more than 4 lines/graph in an update?

Many thanks for this and the other plugins of yours, they are really great.

Posted on
Tue Apr 10, 2018 3:52 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Athassel wrote:
I love both of these new features!
Any chance to be able to plot more than 4 lines/graph in an update?

Many thanks for this and the other plugins of yours, they are really great.

Thanks for the kind words! You scared me for a bit and I had to go look at whether I had actually released those features. :D Your message was well timed. While waiting for bug reports to roll in on the latest update to the WUnderground plugin, I have started looking at the Matplotlib plugin.

Adding more lines is a bit of a double-edged sword. I should be able to add 1 or 2 more lines without much bother, but the notion of something like a dynamic number of lines would be extremely tough (given the hoops I jump through to make the charts look nice). Would 1 or 2 more lines work for you?

Another option that you might try that others have used is layering charts with transparent backgrounds. Set up two devices with the same settings and plot lines 5-8 on the second chart. Then put both charts on the same real estate on your control page. This will likely only work well if all the lines will work with the same scale.

Cheers!

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

[My Plugins] - [My Forums]

Posted on
Wed Apr 11, 2018 4:07 am
Athassel offline
Posts: 7
Joined: Mar 26, 2014
Location: Bray, Ireland

Re: Feature Requests

Good point, I'll try your suggestion with transparent background first!

On a different note, could you put another 'heat': 1 line into the converter with the next update?
My central boiler has a 'heat' state when it's actually 'on'.
Cheers.

Posted on
Wed Apr 11, 2018 5:33 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Athassel wrote:
Good point, I'll try your suggestion with transparent background first!

On a different note, could you put another 'heat': 1 line into the converter with the next update?
My central boiler has a 'heat' state when it's actually 'on'.
Cheers.

Happy to add 'heat' to the binary converter. Does 'off' work for you as the alternate state?

Let me know how you get on with the overlays.

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

[My Plugins] - [My Forums]

Posted on
Wed Apr 11, 2018 1:23 pm
Athassel offline
Posts: 7
Joined: Mar 26, 2014
Location: Bray, Ireland

Re: Feature Requests

Let me know how you get on with the overlays.

Will do.
Does 'off' work for you as the alternate state?

The 'off' state should work as already implemented in the converter.
Thanks.

Posted on
Fri Jul 20, 2018 8:05 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Matplotlib Plugin v0.6.06. Now with more lines. :D

chart_line.png
chart_line.png (64.74 KiB) Viewed 2841 times

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

[My Plugins] - [My Forums]

Posted on
Sun Dec 30, 2018 4:15 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Feature Requests

Closing this thread down. Please add any feature requests to this thread.

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 5 guests