Thanks, works perfectly now.


On Mon, Apr 17, 2017 at 10:00 AM, Thomas Keffer <[email protected]> wrote:

> It's a bug.
>
> The scaling routine is designed to have approximately 10 increments along
> the y-axis. Unfortunately, to pick a nominal tick interval, it divides the
> actual y-minimum and -maximum by 10, instead of the values you gave (28.6
> and 30.6).
>
> The next release will be more flexible in how it picks y axis increments.
> In the meantime, try this patch:
>
> diff --git a/bin/weeplot/utilities.py b/bin/weeplot/utilities.py
> index 3d6f400..e3b215e 100644
> --- a/bin/weeplot/utilities.py
> +++ b/bin/weeplot/utilities.py
> @@ -73,7 +73,10 @@
>          else :
>              fmx = fmn + .01*abs(fmn)
>
> -    frange = fmx - fmn
> +    if minscale is not None and maxscale is not None:
> +        frange = maxscale - minscale
> +    else:
> +        frange = fmx - fmn
>      steps = frange / nsteps
>
>      mag = math.floor(math.log10(steps))
>
>
> -tk
>
>
> On Mon, Apr 17, 2017 at 9:34 AM, Alec Bennett <[email protected]> wrote:
>
>> I'm trying to set a fixed Y scale for a graph of barometric pressure but
>> have trouble. Here's my config for that section:
>>
>>         [[[daybarometer-avg]]]
>>
>>             yscale = 28.6, 30.6, None   # using max low and high on
>> record for the area
>>
>>             [[[[barometer]]]]
>>              aggregate_type = avg
>>              aggregate_interval = 3600
>>              line_gap_fraction = 1.0
>>              color = "#002f80"
>>
>>
>> That produces the attached graph though.
>>
>> Without the yscale parameter it correctly auto scales the Y scale, but
>> I'm trying to use a fixed y scale.
>>
>> Any tips?
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/3SHA200Bz7Y/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to