https://github.com/jw3126/unitfulrecipes.jl
Plots.jl recipes for Unitful.jl arrays
https://github.com/jw3126/unitfulrecipes.jl
julia plots
Last synced: about 1 month ago
JSON representation
Plots.jl recipes for Unitful.jl arrays
- Host: GitHub
- URL: https://github.com/jw3126/unitfulrecipes.jl
- Owner: jw3126
- License: mit
- Created: 2019-08-25T11:02:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-03T20:41:23.000Z (over 2 years ago)
- Last Synced: 2025-04-08T06:43:14.989Z (about 1 month ago)
- Topics: julia, plots
- Language: Julia
- Homepage:
- Size: 150 MB
- Stars: 38
- Watchers: 4
- Forks: 10
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UnitfulRecipes.jl
*for plotting data with units seamlessly in Julia*
## Deprecation
As of Plots.jl `v1.34.2`, UnitfulRecipes is included in Plots, and is no longer
necessary. Instead, loading both Unitful.jl and Plots.jl suffices to plot
unitful data.## Archive
[UnitfulRecipes.jl](https://github.com/jw3126/UnitfulRecipes.jl) makes it easy to plot data with units.
It works by providing [recipes](http://docs.juliaplots.org/latest/recipes/#recipes) for the [Plots.jl](https://github.com/JuliaPlots/Plots.jl) package that can deal with units from [Unitful.jl](https://github.com/PainterQubits/Unitful.jl).
For a quick example,```julia
using Unitful, UnitfulRecipes, Plots
const a = 1u"m/s^2"
v(t) = a * t
x(t) = a/2 * t^2
t = (0:0.01:100)*u"s"
plot(x.(t), v.(t), xlabel="position", ylabel="speed")
```should give something like

Head over to the [documentation](https://jw3126.github.io/UnitfulRecipes.jl/stable/) for more examples!
### Acknowledgements
Inspired by [UnitfulPlots.jl](https://github.com/PainterQubits/UnitfulPlots.jl).