Add custom recipe for histogram of a time series#14
Conversation
|
Seems okay to me for now. |
|
OK. Still needs tests and I need to see if the docstring works correctly. I will remove [WIP] once I'm done. |
|
For the docs to work properly we could add to the docs an |
| import LsqFit: curve_fit | ||
| import Statistics: mean | ||
| using Plots | ||
|
|
There was a problem hiding this comment.
I've read somewhere that there is a suggested order for structuring a module-file. Do you know anything about it and if so do we already follow this?
There was a problem hiding this comment.
To be honest I don't care. Put them in any order you want ;)
| include("plots.jl") | ||
| include("spectroscopy.jl") | ||
| include("theory.jl") | ||
| include("statistics.jl") |
There was a problem hiding this comment.
I would prefer alphabetic order in the included files.
606ce9f to
ead5994
Compare
|
Just as a remark, we could also drop for now the grid and just use layout --> (1,2)which is supported in Recipes. This would mean that the Plots have the same size by default but could be changed in another environment where Plots is present by calling e.g. using LatSpec
using Plots
SeriesHistogramm(dat, layout=grid(1,2, widths = [0.7, 0.3])) |
|
The Docs for this PR are deployed! 🥳 Please make sure that you have documented your new feature properly:
|
|
This branch is now up to date with master and only depends on using LatSpec
using Plots
x = randn(1000)
plt = serieshistogram(x,ylabel1="values",xlabel1="time series",xlabel2="histogram") |
|
I have added docs and tests (I just check that a plot command does not error). This is ready for review and testing from your side. |
|
The Docs for this PR are deployed! 🥳 Please make sure that you have documented your new feature properly:
|
This adds a custom recipe for plotting a histogram next to a time series. I usually use it to plot the plaquette history and its histogram. The labelling of the y-axis does not yet work correctly, also at some point I wanted to make it possible to label the two subplots independently.
This uses
grid()fromPlots.jlsuch that the histogram is smaller than the time series. If we care about load times we can use@requirefromRequires.jlso that the user is warned to includePlots.jlas well or fix the upstream issue JuliaPlots/RecipesBase.jl#15 (see #13).Edit. I also removed currently unused packages from
Project.toml. I think it is best to include only when they are needed so that it is easier to see which PR first made use of it.