Open BeastyBlacksmith opened 2 years ago
Out of curiosity… should this be done for the Tables.jl interface in general?
Might be useful, if that is feasible, but I don't know the interface very well to judge that
Seems to me like it could work on generic Tables.jl given what is defined here; I don't know RecipesBase.jl well enough to know what kind of dependency it is, but we could look into adding this to Tables.jl directly.
I don't know RecipesBase.jl well enough to know what kind of dependency it is
It seems to be a single ~500-line file. Like Tables.jl it's mostly there to provide the interface to be imported and extended, so I suspect there's some synergy. Does DataFrames already have the equivalent of this PR?
Does DataFrames already have the equivalent of this PR?
I didn't make any other PRs. StatsPlots.jl has a @df
macro that can be used to extract columns at the call site, that is scheduled to be moved to Plots.jl for 2.0 (no timeframe though).
I'll also note that DimensionalData.jl provides a set of more elaborate recipes, but I tried to keep things minimalistic here.
This adds two recipes to automatically set the labels.
gives takes first column as
x
and second column asy
. Then you can use either ofto get other combinations.
Currently this only works for
Table
s, but with a common supertype this could potentially be extended to moreTypedTables
.