|
1 | 1 | mutable struct SGGrid <: SGPlots
|
2 | 2 | json_spec
|
3 | 3 | end
|
4 |
| -SGGRID_DEFAULT = Dict{Symbol, Any}(:align => :none, # :all, :each, :none |
5 |
| - :columns => nothing, |
6 |
| - :backcolor=>nothing, |
7 |
| - :center=>[false, false], # for row-column |
8 |
| - :bounds=>:full, # :full/:flush see vega docs |
9 |
| - :rowspace=>0, |
10 |
| - :columnspace=>0, |
11 |
| - :bordercolor=>:transparent |
| 4 | +SGGRID_DEFAULT = SGKwds( |
| 5 | + :align => __dic(:default=> :none, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"Determine how to align plots. It can be one of `:all`, `:each`, or `:none`."), |
| 6 | + :columns => __dic(:default=> nothing, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"Number of columns to be created."), |
| 7 | + :backcolor => __dic(:default=> nothing, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"The back color."), |
| 8 | + :center => __dic(:default=> [false, false], :__ord=>1, :__cat=>"Plot appearance", :__doc=>"The row and column centering, respectively."), |
| 9 | + :bounds => __dic(:default=> :full, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"One of `:full` or `:flush`. See `vega` docs for more information."), |
| 10 | + :rowspace => __dic(:default=> 0, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"Space between rows."), |
| 11 | + :columnspace => __dic(:default=> 0, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"Space between columns."), |
| 12 | + :bordercolor => __dic(:default=> :transparent, :__ord=>1, :__cat=>"Plot appearance", :__doc=>"The color for the border of plots."), |
12 | 13 | )
|
13 | 14 |
|
14 | 15 |
|
15 | 16 | # sggrid positions a collection of SGPlots within a grid
|
| 17 | +""" |
| 18 | + sggrid(sgps...; opts...) |
| 19 | +
|
| 20 | +Position a collection of SG plots within a grid. |
| 21 | +The `opts...` refers to extra keyword arguments which can be passed to `sggrid`. |
| 22 | +
|
| 23 | +$(print_doc(SGGRID_DEFAULT)) |
| 24 | +""" |
16 | 25 | function sggrid(sgp...; opts...)
|
17 | 26 | optsd = val_opts(opts)
|
18 | 27 | global_opts = update_default_opts!(deepcopy(SGGRID_DEFAULT), optsd)
|
|
0 commit comments