From b0f9ada124956686b213f0c032c7585f49b45a9b Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Fri, 12 Mar 2021 23:31:54 +0100 Subject: [PATCH] add df macro --- Project.toml | 7 +++++-- src/Plots.jl | 7 ++++++- src/examples.jl | 2 -- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index f879a9aa..4e00f51f 100644 --- a/Project.toml +++ b/Project.toml @@ -30,6 +30,8 @@ Showoff = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +TableOperations = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [compat] @@ -51,6 +53,8 @@ Requires = "1" Scratch = "1" Showoff = "0.3.1" StatsBase = "0.32, 0.33" +TableOperations = "1" +Tables = "1" julia = "1.5" [extras] @@ -66,11 +70,10 @@ PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990" UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228" VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92" [targets] -test = ["Distributions", "FileIO", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "HDF5", "RDatasets", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "VisualRegressionTests"] +test = ["Distributions", "FileIO", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "HDF5", "RDatasets", "StableRNGs", "StaticArrays", "Test", "TestImages", "UnicodePlots", "VisualRegressionTests"] diff --git a/src/Plots.jl b/src/Plots.jl index 5378fb73..bad608b2 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -22,6 +22,8 @@ using Base.Meta import Showoff import StatsBase import JSON +import Tables +import TableOperations using Requires @@ -116,7 +118,9 @@ export plotattr, scalefontsize, scalefontsizes, - resetfontsizes + resetfontsizes, + + @df # --------------------------------------------------------- @@ -212,6 +216,7 @@ include("ijulia.jl") include("fileio.jl") include("init.jl") include("legend.jl") +include("df.jl") include("backends/plotly.jl") include("backends/gr.jl") diff --git a/src/examples.jl b/src/examples.jl index cfc8e96f..78db59c3 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -515,7 +515,6 @@ const _examples = PlotExample[ "DataFrames", "Plot using DataFrame column symbols.", [ - :(using StatsPlots), # can't be inside begin block because @df gets expanded first :( begin import RDatasets @@ -599,7 +598,6 @@ const _examples = PlotExample[ "Boxplot and Violin series recipes", "", [ - :(using StatsPlots), # can't be inside begin block because @df gets expanded first :( begin import RDatasets