Skip to content

Commit 9c4bbf2

Browse files
committed
Separate attributes section
1 parent 43d80b8 commit 9c4bbf2

File tree

6 files changed

+272
-6
lines changed

6 files changed

+272
-6
lines changed

docs/make.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,17 @@ const PAGES = Any[
116116
"Histograms" => "series_types/histogram.md",
117117
],
118118
],
119+
"Attributes" => [
120+
"Introduction" => "Attributes/attributes.md",
121+
"Series Attributes" => "Attributes/attributes_series.md",
122+
"Plot Attributes" => "Attributes/attributes_plot.md",
123+
"Subplot Attributes" => "Attributes/attributes_subplot.md",
124+
"Axis Attributes" => "Attributes/attributes_axis.md",
125+
"Supported Attributes" => "generated/supported.md",
126+
],
119127
"Manual" => [
120128
"Input Data" => "input_data.md",
121129
"Output" => "output.md",
122-
"Attributes" => "attributes.md",
123-
"Series Attributes" => "generated/attributes_series.md",
124-
"Plot Attributes" => "generated/attributes_plot.md",
125-
"Subplot Attributes" => "generated/attributes_subplot.md",
126-
"Axis Attributes" => "generated/attributes_axis.md",
127130
"Layouts" => "layouts.md",
128131
"Recipes" => [
129132
"Overview" => "recipes.md",
@@ -144,7 +147,6 @@ const PAGES = Any[
144147
"Animations" => "animations.md",
145148
"Themes" => "generated/plotthemes.md",
146149
"Backends" => "backends.md",
147-
"Supported Attributes" => "generated/supported.md",
148150
],
149151
"Learning" => "learning.md",
150152
"Contributing" => "contributing.md", # TODO: testing
File renamed without changes.

docs/src/Attributes/attributes_axis.md

Whitespace-only changes.

docs/src/Attributes/attributes_plot.md

Whitespace-only changes.
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
2+
# Series Attributes
3+
4+
Series attributes apply to individual series, such as lines, scatters, heatmaps, etc.
5+
6+
:label => (AStr, "The label for a series, which appears in a legend. If empty, no legend entry is added."),
7+
:seriescolor => (ColorType, "The base color for this series. `:auto` (the default) will select a color from the subplot's `color_palette`, based on the order it was added to the subplot. Also describes the colormap for surfaces."),
8+
:seriesalpha => (Real, "The alpha/opacity override for the series. `nothing` (the default) means it will take the alpha value of the color."),
9+
:seriestype => (Symbol, "This is the identifier of the type of visualization for this series. Choose from $(_allTypes) or any series recipes which are defined."),
10+
:linestyle => (Symbol, "Style of the line (for path and bar stroke). Choose from $(_allStyles)"),
11+
:linewidth => (Real, "Width of the line (in pixels)."),
12+
:linecolor => (ColorType, "Color of the line (for path and bar stroke). `:match` will take the value from `:seriescolor`, (though histogram/bar types use `:black` as a default)."),
13+
:linealpha => (Real, "The alpha/opacity override for the line. `nothing` (the default) means it will take the alpha value of linecolor."),
14+
:fillrange => (Union{Real,AVec}, "Fills area between fillrange and `y` for line-types, sets the base for `bar`, `sticks` types, and similar for other types."),
15+
:fillcolor => (ColorType, "Color of the filled area of path or bar types. `:match` will take the value from `:seriescolor`."),
16+
:fillalpha => (Real, "The alpha/opacity override for the fill area. `nothing` (the default) means it will take the alpha value of fillcolor."),
17+
:markershape => (Union{Symbol,Shape,AVec}, "Choose from $(_allMarkers)."),
18+
:fillstyle => (Symbol, "Style of the fill area. `nothing` (the default) means solid fill. Choose from :/, :\\, :|, :-, :+, :x."),
19+
:markercolor => (ColorType, "Color of the interior of the marker or shape. `:match` will take the value from `:seriescolor`."),
20+
:markeralpha => (Real, "The alpha/opacity override for the marker interior. `nothing` (the default) means it will take the alpha value of markercolor."),
21+
:markersize => (Union{Real,AVec}, "Size (radius pixels) of the markers."),
22+
:markerstrokestyle => (Symbol, "Style of the marker stroke (border). Choose from $(_allStyles)."),
23+
:markerstrokewidth => (Real, "Width of the marker stroke (border) in pixels."),
24+
:markerstrokecolor => (ColorType, "Color of the marker stroke (border). `:match` will take the value from `:foreground_color_subplot`."),
25+
:markerstrokealpha => (Real, "The alpha/opacity override for the marker stroke (border). `nothing` (the default) means it will take the alpha value of markerstrokecolor."),
26+
:bins => (Union{Integer,NTuple{2,Integer},AVec,Symbol}, """
27+
Default is :auto (the Freedman-Diaconis rule). For histogram-types, defines the approximate number of bins to aim for, or the auto-binning algorithm to use (:sturges, :sqrt, :rice, :scott or :fd).
28+
For fine-grained control pass a Vector of break values, e.g. `range(minimum(x), stop = maximum(x), length = 25)`."""),
29+
:smooth => (Bool, "Add a regression line ?"),
30+
:group => (AVec, "Data is split into a separate series, one for each unique value in `group`."),
31+
:x => (Any, "Input data (first dimension)."),
32+
:y => (Any, "Input data (second dimension)."),
33+
:z => (Any, "Input data (third dimension). May be wrapped by a `Surface` for surface and heatmap types."),
34+
:marker_z => (Union{AVec,Function}, "z-values for each series data point, which correspond to the color to be used from a markercolor gradient (`f(x,y,z) -> z_value` or `f(x,y) -> z_value`)."),
35+
:line_z => (Union{AVec,Function}, "z-values for each series line segment, which correspond to the color to be used from a linecolor gradient. Note that for N points, only the first N-1 values are used (one per line-segment)."),
36+
:fill_z => (AMat, "Matrix of the same size as z matrix, which specifies the color of the 3D surface."),
37+
:levels => (Union{AVec,Integer}, "Singleton for number of contours or iterable for contour values. Determines contour levels for a contour type."),
38+
:permute => (NTuple{2,Symbol}, "Permutes data and axis properties of the axes given in the tuple, e.g. (:x, :y)."),
39+
:orientation => (Symbol, "(deprecated) Horizontal or vertical orientation for bar types. Values `:h`, `:hor`, `:horizontal` correspond to horizontal (sideways, anchored to y-axis), and `:v`, `:vert`, and `:vertical` correspond to vertical (the default)."),
40+
:xerror => (Union{AVec,NTuple{2,AVec}}, "`x` (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)."),
41+
:yerror => (Union{AVec,NTuple{2,AVec}}, "`y` (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)."),
42+
:ribbon => (Union{Real,AVec}, "Creates a fillrange around the data points."),
43+
:quiver => (Union{AVec,NTuple{2,AVec}}, "The directional vectors U,V which specify velocity/gradient vectors for a quiver plot."),
44+
:normalize => (Union{Bool,Symbol}, "Histogram normalization mode. Possible values are: false/:none (no normalization, default), true/:pdf (normalize to a discrete PDF, where the total area of the bins is 1), :probability (bin heights sum to 1) and :density (the area of each bin, rather than the height, is equal to the counts - useful for uneven bin sizes)."),
45+
:weights => (AVec, "Used in histogram types for weighted counts."),
46+
:show_empty_bins => (Bool, "Whether empty bins in a 2D histogram are colored as 0 (true), or transparent (the default)."),
47+
:contours => (Bool, "Add contours to the side-grids of 3D plots? Used in surface/wireframe."),
48+
:contour_labels => (Bool, "Show labels at the contour lines ?"),
49+
:match_dimensions => (Bool, "For heatmap types: should the first dimension of a matrix (rows) correspond to the first dimension of the plot (`x`-axis) ? Defaults to `false`, which matches the behavior of Matplotlib, Plotly, and others. Note: when passing a function for `z`, the function should still map `(x,y) -> z`."),
50+
:subplot => (Union{Integer,Subplot}, "The subplot that this series belongs to."),
51+
:series_annotations => (Union{AVec,AStr,PlotText}, "These are annotations which are mapped to data points/positions."),
52+
:primary => (Bool, "Does this count as a 'real series'? For example, you could have a path (primary), and a scatter (secondary) as two separate series, maybe with different data (see `sticks` recipe for an example). The secondary series will get the same color, etc as the primary."),
53+
:hover => (AVec{AStr}, "Text to display when hovering over each data point."),
54+
:colorbar_entry => (Bool, "Include this series in the color bar? Set to `false` to exclude."),
55+
:z_order => (Union{Symbol,Integer}, ":front (default), :back or index of position where 1 is farest in the background."),
56+
57+
### arrow
58+
```julia
59+
arrow :: Union{Bool, Plots.Arrow}
60+
```
61+
Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.
62+
63+
Alias `:arrows`.
64+
65+
Defaults to `nothing`.
66+
67+
### bar_edges
68+
```julia
69+
bar_edges :: Bool
70+
```
71+
Align bars to edges with `true`, or centers with `false`.
72+
73+
Defaults to `false`.
74+
75+
### bar_position
76+
```julia
77+
bar_position :: Symbol
78+
```
79+
Choose from `:overlay` (default) or `:stack`. (Warning: may only be partially implemented)
80+
81+
Aliases `bar_positions`, `barpositions`.
82+
83+
84+
### bar_width
85+
:bar_width => (Real, " Width of bars in data coordinates. When `nothing`, chooses based on `x` (or `y` when `orientation = :h`)."),
86+
87+
### bins
88+
```julia
89+
bins :: Union{Integer, Symbol, Tuple{Integer, Integer}, AbstractVector}
90+
```
91+
Defines the number of bins.
92+
93+
Aliases `:bin`, `:nb`, `:nbin`, `:nbins`.
94+
95+
Defaults to `:auto`, the Freedman-Diaconis rule.
96+
97+
Can take in one of the following types:
98+
* `Integer` – defines the approximate number of bins to aim for. Not guaranteed to give the exact value.
99+
* `bins=10` gives a 1D histogram with about 10 bins.
100+
* `bins=10` gives a 2D histogram with about 10 bins for each dimension.
101+
* `Tuple{Integer, Integer}` – for two-dimensional histograms, defines the approximate number of bins per dimension. Not guaranteed to give the exact values.
102+
* `bins=(10, 20)` gives a 2D histogram with about 10 bins for the `x` dimension and about 20 bins for the `y` dimension.
103+
* `Symbol` – defines the auto-binning algorithm to use.
104+
* `:sturges`[Sturges' rule](https://en.wikipedia.org/wiki/Histogram#Sturges'_formula)
105+
* `:sqrt`[Square root rule](https://en.wikipedia.org/wiki/Histogram#Square-root_choice)
106+
* `:rice`[Rice rule](https://en.wikipedia.org/wiki/Histogram#Rice_rule)
107+
* `:scott`[Scott's normal reference rule](https://en.wikipedia.org/wiki/Histogram#Scott's_normal_reference_rule)
108+
* `:fd` (default) – [Freedman-Diaconis' rule](https://en.wikipedia.org/wiki/Histogram#Freedman%E2%80%93Diaconis'_choice)
109+
* `AbstractVector` – defines a vector of values for bin edges.
110+
* `bins=range(-10, 10, length=21)` gives a histogram with bins starting from -10, ending at 10, and containing 21 break values, giving 20 bins.
111+
112+
Relevant attribute for the following series types:
113+
* [`histogram`](https://docs.juliaplots.org/stable/api/#Plots.histogram-Tuple)
114+
* [`histogram2d`](https://docs.juliaplots.org/stable/api/#Plots.histogram2d-Tuple)
115+
116+
### colorbar_entry
117+
118+
119+
### connections
120+
121+
122+
### contour_labels
123+
124+
125+
### contours
126+
127+
128+
### extra_kwargs
129+
130+
131+
### fill_z
132+
133+
134+
### fillalpha
135+
136+
137+
### fillcolor
138+
139+
140+
### fillrange
141+
142+
143+
### fillstyle
144+
145+
146+
### group
147+
148+
149+
### hover
150+
151+
152+
### label
153+
154+
155+
### levels
156+
157+
158+
### line_z
159+
160+
161+
### linealpha
162+
163+
164+
### linecolor
165+
166+
167+
### linestyle
168+
169+
170+
### linewidth
171+
172+
173+
### marker_z
174+
175+
176+
### markeralpha
177+
178+
179+
### markercolor
180+
181+
182+
### markershape
183+
184+
185+
### markersize
186+
187+
188+
### markerstrokealpha
189+
190+
191+
### markerstrokestyle
192+
193+
194+
### markerstrokewidth
195+
196+
197+
### normalize
198+
199+
200+
### orientation
201+
202+
203+
### permute
204+
205+
206+
### primary
207+
208+
209+
### quiver
210+
211+
212+
### ribbon
213+
214+
215+
### series_annotations
216+
217+
218+
### seriesalpha
219+
220+
221+
### seriescolor
222+
223+
224+
### seriestype
225+
226+
227+
### show_empty_bins
228+
229+
230+
### smooth
231+
232+
233+
### stride
234+
235+
236+
### subplot
237+
238+
239+
### weights
240+
241+
242+
### x
243+
244+
245+
### xerror
246+
247+
248+
### y
249+
250+
251+
### yerror
252+
253+
254+
### z
255+
256+
257+
### z_order
258+
259+
260+
### zerror
261+
262+
263+
264+

docs/src/Attributes/attributes_subplot.md

Whitespace-only changes.

0 commit comments

Comments
 (0)