SVG Graphics

30 views
Skip to first unread message

Sigi M

unread,
Oct 15, 2025, 11:02:46 AM (16 hours ago) Oct 15
to weewx-user

Good day,


I would like to use WeeWX 5.2 with my skin, which is an extension of the Seasons skin, to replace the .png graphics generated by ImageGenerator with .svg graphics that I can control via the page’s .css in terms of font, color, line thickness, etc.

I have already managed to get the CheetahGenerator to create .svg files using .svg.tmpl templates.

However, I am struggling to generate the trend curves, for example, for temperature. Simple outputs of the current temperature work fine.


Is there anyone who can help me with this? Maybe even someone who has already solved this problem for themselves.

Is there perhaps an extension that does exactly this?


Many thanks for any help and reply.


Have a nice day,

Sigi

Tom Keffer

unread,
Oct 15, 2025, 8:40:40 PM (6 hours ago) Oct 15
to weewx...@googlegroups.com
Unfortunately, there is no extension that I know of that does this.

It's not clear to me what you have been able to generate, and what you have not. It sounds like you have been able to generate text-based SVG files, such as the current temperature in a text form, but not a curve representing the day's temperature. Is that correct?

The current plotting engine (weeplot.genplot) is very biased towards Python's PIL library, so it would not be easy to adapt. It is called by ImageGenerator, which is fairly generic and could be adapted to call some other plotting engine.

The most elegant solution would be to replace weeplot.genplot with your own SVG-based engine. ImageGenerator would then be changed to allow it to call either engine.

It would be a largish project, but a good learning experience! 

-tk

--
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 visit https://groups.google.com/d/msgid/weewx-user/5b527fd6-01a7-49b0-a37c-7d0ddcbbd0e1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages