graphs: Unicode and Cardinal Wind directions

41 views
Skip to first unread message

Pila

unread,
Sep 23, 2019, 8:06:00 AM9/23/19
to weewx-user
How to get unicode letters in graph title: Kiša should look like this: Kiša

Wind directions in graphs: how to change scale of graphs from deg to letters to display Cardinal points instead of numbers?

I am reading docs, and have modified many items, but these I can not get on my own for now.

Thomas Keffer

unread,
Sep 23, 2019, 8:20:15 AM9/23/19
to weewx-user
How to get unicode letters in graph title: Kiša should look like this: Kiša

Just use UTF-8 encoding for the label title in the appropriate configuration file. For example, for the Seasons skin, in file Seasons/skin.conf, change this
[[[dayrain]]]
# Make sure the y-axis increment is at least 0.02 for the rain plot
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 3600
label = Rain (hourly total)
to this:

[[[dayrain]]]
    # Make sure the y-axis increment is at least 0.02 for the rain plot
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 3600
        label = Kiša

 
Wind directions in graphs: how to change scale of graphs from deg to letters to display Cardinal points instead of numbers?


Unfortunately, you can't. All scales must be numbers. Sorry.

-tk

Pila

unread,
Sep 23, 2019, 8:48:17 AM9/23/19
to weewx-user
OK, I see, not HTML chars but the plain ones are needed for graphs.

And as for the Cardinal points - I was afraid that may be the answer seeing the strucutre of data usage.

Thomas Keffer

unread,
Sep 23, 2019, 9:04:01 AM9/23/19
to weewx-user
The disadvantage of HTML entities (such as š) is that they can only be used in, well..., HTML. That means the templates. 

The advantage is that they consist of nothing but ASCII characters, so they are always displayed the same way.

By contrast, the advantage of UTF-8 characters is that they are easy to understand. Kiša is more intuitive than Ki%scaran;a. 

The disadvantage is they require that software be told what the encoding is. Many text editors don't handle this well.

So, WeeWX uses entities where it can (the templates), and UTF-8 elsewhere.

-tk

-tk

On Mon, Sep 23, 2019 at 5:48 AM Pila <da...@vip.hr> wrote:
OK, I see, not HTML chars but the plain ones are needed for graphs.

And as for the Cardinal points - I was afraid that may be the answer seeing the strucutre of data usage.

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/35e2820c-3767-4fef-bb64-22b2019f63c7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages