ansemjo / speedtest-plotter

running scheduled speedtests inside docker and plotting the results with gnuplot
MIT License
60 stars 12 forks source link

[Feat Req] Any chance of specifying target graph resolution? #51

Closed jaxjexjox closed 3 years ago

jaxjexjox commented 3 years ago

-e RES_WIDTH 1920 -e RES_HEIGHT 1080

etc?

Would be really nice.

ansemjo commented 3 years ago

The output /result.svg is a vector graphic anyway, which you can arbitrarily resize (by a factor of 1.5 in this case) – unless you're using an old version which still uses .png ..

But sure, setting this line with variables should be easy to do: https://github.com/ansemjo/speedtest-plotter/blob/29ca8b9d512563e50c78126130ad0c9b09b7792b/plotscript#L11

jaxjexjox commented 3 years ago

Can I do this via an enviroment variable, should I map plotscript out with -v at launch, or manually edit the file, inside the container each time?

(I'm a B- skill with this, sorry)

ansemjo commented 3 years ago

You could edit the file manually for now. I'm not at home right now so I can't change this upstream but I will probably make this an environment variable in the next few days ..

jaxjexjox commented 3 years ago

I appreciate your hard work, I'm having difficulty with VI because it's awful, so I might just wait the extra days.

Pretty decent app, this is the 3'rd one I'm on, due to people breaking their work though!

ansemjo commented 3 years ago

..., due to people breaking their work though!

What do you mean? People just stopping development or what do you mean by "breaking"?

Also, what exactly do you want to achieve with this resolution change? I've just tried some different values and noticed that all the padding and label positions etc. are given relative to the entire plot area; so they don't scale cleanly. Making sure the plot looks good at any range of resolutions would be a little more work than just making the resolution itself a variable ...

For example, 600 x 200: image vs. 6000 x 2000: image

ansemjo commented 3 years ago

Implemented fontsize-aware positioning and configurable output resolution. See the added docs on usage.

tl;dr: add -e RESOLUTION=1920,1080 to your container and play with the font size -e FONT=,14 if it becomes too small

jaxjexjox commented 3 years ago

I'll need to pull down a new docker image I imagine, right?
I just spent 5 minutes testing this, realising, I forgot to pull a new image.

Thank you!

ansemjo commented 3 years ago

Yes and you also need to wait for the automated build workflow to finish first! :)