Skip to content

Commit f516250

Browse files
committed
Update attributes_plot.md
1 parent 4ce54f0 commit f516250

File tree

1 file changed

+327
-0
lines changed

1 file changed

+327
-0
lines changed
Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
2+
# Plot Attributes
3+
4+
A Plot contains a tree-like layout of Subplots. These attributes apply to the full Plot.
5+
6+
## Contents
7+
8+
| Attribute | Aliases |
9+
| :--- | :--- |
10+
| [`background_color`](@ref plotattr_background_color) | `background` `background_colors` `background_colour` `backgroundcolors` `backgroundcolour` `bg` `bg_color` `bg_colour` `bgcolor` `bgcolour` |
11+
| [`background_color_outside`](@ref plotattr_background_color_outside) | `background_color_outsides` `background_colour_outside` `background_outside` `backgroundcoloroutsides` `backgroundcolouroutside` `backgroundoutside` `bg_color_outside` `bg_colour_outside` `bg_outside` `bgcolor_outside` `bgcoloroutside` `bgcolour_outside` `bgcolouroutside` `bgoutside` |
12+
| [`display_type`](@ref plotattr_display_type) | `display_types` `displaytypes` |
13+
| [`dpi`](@ref plotattr_dpi) | `dpis` |
14+
| [`extra_kwargs`](@ref plotattr_extra_kwargs) | |
15+
| [`extra_plot_kwargs`](@ref plotattr_extra_plot_kwargs) | |
16+
| [`fontfamily`](@ref plotattr_fontfamily) | `fontfamilys` |
17+
| [`foreground_color`](@ref plotattr_foreground_color) | `fg` `fg_color` `fg_colour` `fgcolor` `fgcolour` `foreground` `foreground_colors` `foreground_colour` `foregroundcolors` `foregroundcolour` |
18+
| [`html_output_format`](@ref plotattr_html_output_format) | `fmt` `format` `html_format` `html_output_formats` `htmlformat` `htmloutputformats` |
19+
| [`inset_subplots`](@ref plotattr_inset_subplots) | `floating` `inset` |
20+
| [`layout`](@ref plotattr_layout) | `layouts` |
21+
| [`link`](@ref plotattr_link) | `links` |
22+
| [`overwrite_figure`](@ref plotattr_overwrite_figure) | `clearfig` `clf` `overwrite` `overwrite_figures` `overwritefigures` `reuse` |
23+
| [`plot_title`](@ref plotattr_plot_title) | `plot_titles` `plottitles` |
24+
| [`plot_titlefontcolor`](@ref plotattr_plot_titlefontcolor) | `plot_titlefontcolors` `plottitlefontcolors` |
25+
| [`plot_titlefontfamily`](@ref plotattr_plot_titlefontfamily) | `plot_titlefontfamilys` `plottitlefontfamilys` |
26+
| [`plot_titlefonthalign`](@ref plotattr_plot_titlefonthalign) | `plot_titlefonthaligns` `plottitlefonthaligns` |
27+
| [`plot_titlefontrotation`](@ref plotattr_plot_titlefontrotation) | `plot_titlefontrotations` `plottitlefontrotations` |
28+
| [`plot_titlefontsize`](@ref plotattr_plot_titlefontsize) | `plot_titlefontsizes` `plottitlefontsizes` |
29+
| [`plot_titlefontvalign`](@ref plotattr_plot_titlefontvalign) | `plot_titlefontvaligns` `plottitlefontvaligns` |
30+
| [`plot_titleindex`](@ref plotattr_plot_titleindex) | `plot_titleindexs` `plottitleindexs` |
31+
| [`plot_titlelocation`](@ref plotattr_plot_titlelocation) | `plot_titlelocations` `plottitlelocations` |
32+
| [`plot_titlevspan`](@ref plotattr_plot_titlevspan) | `plot_titlevspans` `plottitlevspans` |
33+
| [`pos`](@ref plotattr_pos) | |
34+
| [`show`](@ref plotattr_show) | `display` `gui` `shows` |
35+
| [`size`](@ref plotattr_size) | `sizes` `windowsize` `wsize` |
36+
| [`tex_output_standalone`](@ref plotattr_tex_output_standalone) | `tex_output_standalones` `texoutputstandalones` |
37+
| [`thickness_scaling`](@ref plotattr_thickness_scaling) | `thickness_scalings` `thicknessscalings` |
38+
| [`warn_on_unsupported`](@ref plotattr_warn_on_unsupported) | `warn` `warn_on_unsupporteds` `warnonunsupporteds` |
39+
| [`window_title`](@ref plotattr_window_title) | `window_titles` `windowtitle` `windowtitles` `wtitle` |
40+
41+
## Documentation
42+
43+
### [background_color](@id plotattr_background_color)
44+
```julia
45+
background_color :: Union{Integer, Symbol, ColorSchemes.ColorScheme, Colorant}
46+
```
47+
**Aliases:** `background` `background_colors` `background_colour` `backgroundcolors` `backgroundcolour` `bg` `bg_color` `bg_colour` `bgcolor` `bgcolour`
48+
49+
Base color for all backgrounds.
50+
51+
Defaults to `RGB{N0f8}(1.0, 1.0, 1.0)` (white).
52+
53+
### [background_color_outside](@id plotattr_background_color_outside)
54+
```julia
55+
background_color_outside :: Union{Integer, Symbol, ColorSchemes.ColorScheme, Colorant}
56+
```
57+
**Aliases:** `background_color_outsides` `background_colour_outside` `background_outside` `backgroundcoloroutsides` `backgroundcolouroutside` `backgroundoutside` `bg_color_outside` `bg_colour_outside` `bg_outside` `bgcolor_outside` `bgcoloroutside` `bgcolour_outside` `bgcolouroutside` `bgoutside`
58+
59+
Color outside the plot area(s). `:match` matches `:background_color`.
60+
61+
Defaults to `:match`.
62+
63+
### [display_type](@id plotattr_display_type)
64+
```julia
65+
display_type :: Symbol
66+
```
67+
**Aliases:** `display_types` `displaytypes`
68+
69+
When supported, `display` will either open a GUI window or plot inline. Choose from `:auto`, `:gui`, or `:inline`.
70+
71+
Defaults to `:auto`.
72+
73+
### [dpi](@id plotattr_dpi)
74+
```julia
75+
dpi :: Real
76+
```
77+
**Aliases:** `dpis`
78+
79+
Dots per inch of output figures.
80+
81+
Defaults to `100`.
82+
83+
### [extra_kwargs](@id plotattr_extra_kwargs)
84+
```julia
85+
extra_kwargs :: Symbol
86+
```
87+
88+
Specify for which element extra keyword args are collected or a KW (`Dict{Symbol, Any}`) to pass a map of extra keyword args which may be specific to a backend. Choose from (`:plot`, `:subplot`, `:series`), defaults to `:series`. Example: `pgfplotsx(); scatter(1:5, extra_kwargs=Dict(:subplot=>Dict("axis line shift" => "10pt"))`.
89+
90+
Defaults to `:series`.
91+
92+
### [extra_plot_kwargs](@id plotattr_extra_plot_kwargs)
93+
```julia
94+
extra_plot_kwargs :: Any
95+
```
96+
97+
Defaults to `Dict{Any, Any}()`.
98+
99+
### [fontfamily](@id plotattr_fontfamily)
100+
```julia
101+
fontfamily :: Union{AbstractString, Symbol}
102+
```
103+
**Aliases:** `fontfamilys`
104+
105+
Default font family for title, legend entries, tick labels and guides.
106+
107+
Defaults to `"sans-serif"`.
108+
109+
### [foreground_color](@id plotattr_foreground_color)
110+
```julia
111+
foreground_color :: Union{Integer, Symbol, ColorSchemes.ColorScheme, Colorant}
112+
```
113+
**Aliases:** `fg` `fg_color` `fg_colour` `fgcolor` `fgcolour` `foreground` `foreground_colors` `foreground_colour` `foregroundcolors` `foregroundcolour`
114+
115+
Base color for all foregrounds.
116+
117+
Defaults to `:auto`.
118+
119+
### [html_output_format](@id plotattr_html_output_format)
120+
```julia
121+
html_output_format :: Symbol
122+
```
123+
**Aliases:** `fmt` `format` `html_format` `html_output_formats` `htmlformat` `htmloutputformats`
124+
125+
When writing HTML output, what is the format? `:png` and `:svg` are currently supported.
126+
127+
Defaults to `:auto`.
128+
129+
### [inset_subplots](@id plotattr_inset_subplots)
130+
```julia
131+
inset_subplots :: AbstractVector{Tuple{Any, Any}}
132+
```
133+
**Aliases:** `floating` `inset`
134+
135+
Optionally pass a vector of `(parent, bbox)` tuples which are the parent layout and the relative bounding box of inset subplots.
136+
137+
Defaults to `nothing`.
138+
139+
### [layout](@id plotattr_layout)
140+
```julia
141+
layout :: Union{Integer, Tuple{Integer, Integer}, AbstractLayout}
142+
```
143+
**Aliases:** `layouts`
144+
145+
Number of subplot, grid dimensions, layout (for example `grid(2,2)`), or the return from the `@layout` macro. This builds the layout of subplots.
146+
147+
Defaults to `1`.
148+
149+
### [link](@id plotattr_link)
150+
```julia
151+
link :: Symbol
152+
```
153+
**Aliases:** `links`
154+
155+
How/whether to link axis limits between subplots.
156+
157+
Defaults to `:none`.
158+
159+
Choose from the following:
160+
* `:none`
161+
* `:x` – x axes are linked by columns
162+
* `:y` – y axes are linked by rows
163+
* `:both` – x and y are linked
164+
* `:all` – every subplot is linked together regardless of layout position
165+
166+
### [overwrite_figure](@id plotattr_overwrite_figure)
167+
```julia
168+
overwrite_figure :: Bool
169+
```
170+
**Aliases:** `clearfig` `clf` `overwrite` `overwrite_figures` `overwritefigures` `reuse`
171+
172+
Should we reuse the same GUI window/figure when plotting (true), or open a new one (false)?
173+
174+
Defaults to `true`.
175+
176+
### [plot_title](@id plotattr_plot_title)
177+
```julia
178+
plot_title :: AbstractString
179+
```
180+
**Aliases:** `plot_titles` `plottitles`
181+
182+
Whole plot title (not to be confused with the title for individual subplots).
183+
184+
Defaults to `""` (empty string).
185+
186+
### [plot_titlefontcolor](@id plotattr_plot_titlefontcolor)
187+
```julia
188+
plot_titlefontcolor :: Any
189+
```
190+
**Aliases:** `plot_titlefontcolors` `plottitlefontcolors`
191+
192+
Defaults to `:match`.
193+
194+
### [plot_titlefontfamily](@id plotattr_plot_titlefontfamily)
195+
```julia
196+
plot_titlefontfamily :: Any
197+
```
198+
**Aliases:** `plot_titlefontfamilys` `plottitlefontfamilys`
199+
200+
Defaults to `:match`.
201+
202+
### [plot_titlefonthalign](@id plotattr_plot_titlefonthalign)
203+
```julia
204+
plot_titlefonthalign :: Any
205+
```
206+
**Aliases:** `plot_titlefonthaligns` `plottitlefonthaligns`
207+
208+
Defaults to `:hcenter`.
209+
210+
### [plot_titlefontrotation](@id plotattr_plot_titlefontrotation)
211+
```julia
212+
plot_titlefontrotation :: Any
213+
```
214+
**Aliases:** `plot_titlefontrotations` `plottitlefontrotations`
215+
216+
Defaults to `0.0`.
217+
218+
### [plot_titlefontsize](@id plotattr_plot_titlefontsize)
219+
```julia
220+
plot_titlefontsize :: Any
221+
```
222+
**Aliases:** `plot_titlefontsizes` `plottitlefontsizes`
223+
224+
Defaults to `16`.
225+
226+
### [plot_titlefontvalign](@id plotattr_plot_titlefontvalign)
227+
```julia
228+
plot_titlefontvalign :: Any
229+
```
230+
**Aliases:** `plot_titlefontvaligns` `plottitlefontvaligns`
231+
232+
Defaults to `:vcenter`.
233+
234+
### [plot_titleindex](@id plotattr_plot_titleindex)
235+
```julia
236+
plot_titleindex :: Any
237+
```
238+
**Aliases:** `plot_titleindexs` `plottitleindexs`
239+
240+
Defaults to `0`.
241+
242+
### [plot_titlelocation](@id plotattr_plot_titlelocation)
243+
```julia
244+
plot_titlelocation :: Any
245+
```
246+
**Aliases:** `plot_titlelocations` `plottitlelocations`
247+
248+
Defaults to `:center`.
249+
250+
### [plot_titlevspan](@id plotattr_plot_titlevspan)
251+
```julia
252+
plot_titlevspan :: Real
253+
```
254+
**Aliases:** `plot_titlevspans` `plottitlevspans`
255+
256+
Vertical span of the whole plot title (fraction of the plot height).
257+
258+
Defaults to `0.05`.
259+
260+
### [pos](@id plotattr_pos)
261+
```julia
262+
pos :: Tuple{Integer, Integer}
263+
```
264+
265+
`(left_px, top_px)` position of the GUI window (note: currently unimplemented).
266+
267+
Defaults to `(0, 0)`.
268+
269+
### [show](@id plotattr_show)
270+
```julia
271+
show :: Bool
272+
```
273+
**Aliases:** `display` `gui` `shows`
274+
275+
Should this command open/refresh a GUI/display? Allows to display plots in scripts or functions without explicitly calling `display`.
276+
277+
Defaults to `false`.
278+
279+
### [size](@id plotattr_size)
280+
```julia
281+
size :: Tuple{Integer, Integer}
282+
```
283+
**Aliases:** `sizes` `windowsize` `wsize`
284+
285+
`(width_px, height_px)` of the whole Plot.
286+
287+
Defaults to `(600, 400)`.
288+
289+
### [tex_output_standalone](@id plotattr_tex_output_standalone)
290+
```julia
291+
tex_output_standalone :: Bool
292+
```
293+
**Aliases:** `tex_output_standalones` `texoutputstandalones`
294+
295+
When writing TeX output, should the source include a preamble for a standalone document class?
296+
297+
Defaults to `false`.
298+
299+
### [thickness_scaling](@id plotattr_thickness_scaling)
300+
```julia
301+
thickness_scaling :: Real
302+
```
303+
**Aliases:** `thickness_scalings` `thicknessscalings`
304+
305+
Scale for the thickness of all line elements like lines, borders, axes, grid lines, etc.
306+
307+
Defaults to `1`.
308+
309+
### [warn_on_unsupported](@id plotattr_warn_on_unsupported)
310+
```julia
311+
warn_on_unsupported :: Bool
312+
```
313+
**Aliases:** `warn` `warn_on_unsupporteds` `warnonunsupporteds`
314+
315+
Warn on unsupported attributes, series types, and marker shapes.
316+
317+
Defaults to `true`.
318+
319+
### [window_title](@id plotattr_window_title)
320+
```julia
321+
window_title :: AbstractString
322+
```
323+
**Aliases:** `window_titles` `windowtitle` `windowtitles` `wtitle`
324+
325+
Title of the standalone gui-window.
326+
327+
Defaults to `"Plots.jl"`.

0 commit comments

Comments
 (0)