Plots.jl icon indicating copy to clipboard operation
Plots.jl copied to clipboard

[FR] UnitfulRecipes.jl as dependency?

Open juliohm opened this issue 2 years ago • 9 comments

Could this package be a dependency or maybe be ported fully to Plots.jl? I don't think users would complain about the additional Unitful.jl dependency in Plots.jl?

Can we get a all-batteries-included experience in terms of units without forcing users to load UnitfulRecipes.jl manually?

juliohm avatar Feb 22 '22 11:02 juliohm

Personally I am in favor of this. It should be noted that this adds ~0.2 seconds of using time making it ~3s in total for Plots on my machine. @briochemc what is your opinion on this?

BeastyBlacksmith avatar Feb 22 '22 12:02 BeastyBlacksmith

Sorry for the delay, for some reason I did not get notified of this...

I'm also in favor of this but I would like to note that there are a few rough edges that have not been ironed out (yet?) in UnitfulRecipes.

Pinging @jw3126 and @gustaphe too :)

briochemc avatar Mar 07 '22 03:03 briochemc

Thanks, @juliohm for bringing this up! To me the question really is how often do people want unitful plotting. Personally, I use it quite a bit, but it might be that 99.9% of julia users don't. I really have no idea. Can one get insight into this? Is there telemetry info about how often Plots.jl + Unitful.jl is simultaneously installed or something like that?

jw3126 avatar Mar 07 '22 07:03 jw3126

Unitful.jl is a super lightweight dependency and I wonder if it wouldn't be much easier for end users to just have these recipes added here. Alternatively if they are just recipes, they could go into Unitful.jl directly?

Em seg., 7 de mar. de 2022 04:43, Jan Weidner @.***> escreveu:

Thanks, @juliohm https://github.com/juliohm for bringing this up! To me the question really is how often do people want unitful plotting. Personally, I use it quite a bit, but it might be that 99.9% of julia users don't. I really have no idea. Can one get insight into this? Is there telemetry info about how often Plots.jl + Unitful.jl is simultaneously installed or something like that?

— Reply to this email directly, view it on GitHub https://github.com/JuliaPlots/Plots.jl/issues/4114#issuecomment-1060279573, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQW3ME2MP2YE5MEB6IVRLU6WXTJANCNFSM5PBCNRIA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

juliohm avatar Mar 07 '22 09:03 juliohm

Unitful.jl is a super lightweight dependency

It does add 0.2s load time, I would not call this super lightweight.

I wonder if it wouldn't be much easier for end users to just have these recipes added here.

I fully agree it would be very nice for end users if unitful plots worked out of the box. Probably many users of Plots + Unitful are not even aware that they can work together nicely.

jw3126 avatar Mar 07 '22 11:03 jw3126

Alternatively if they are just recipes, they could go into Unitful.jl directly?

This is a very good suggestion. I imagine that most Plots.jl users don't use Unitful.jl, but that many (most?) Unitful.jl users also use Plots.jl .

jw3126 avatar Mar 07 '22 11:03 jw3126

Yes that seems like the right design

mkborregaard avatar Mar 07 '22 12:03 mkborregaard

Not sure Unitful will want to pull in even RecipesBase as a dependency, they are (rightfully) very proud of their light weight. I don't have a strong opinion on any of the options, I've gotten used to

using Unitful, Plots, UnitfulRecipes, Latexify, UnitfulLatexify

The best thing would of course be if the idea of native Requires actually happens.

gustaphe avatar Mar 07 '22 12:03 gustaphe

Would be good to hear the opinion of @ajkeller34 and @sostock

BeastyBlacksmith avatar Mar 07 '22 13:03 BeastyBlacksmith