diagram
lq.diagram(width=6cm, height=4cm, title=none, legend=(:), xlim=auto, ylim=auto, xlabel=none, ylabel=none, grid=auto, xscale="linear", yscale="linear", xaxis=(:), yaxis=(:), margin=6%, cycle=petroff10, fill=none, ..children)
Creates a new diagram.
width : length
default: 6cm
The width of the diagram area.
height : length
default: 4cm
The height of the diagram area.
title : lq.title
| str
| content
| none
default: none
The title for the diagram. Use a title
object for more options.
legend : none
| dictionary
default: (:)
Options to pass to the legend constructor. If set to none
, no legend is
shown.
xlim : auto
| array
default: auto
Data limits along the -axis. Expects auto
or a tuple (min, max)
where min
and max
may individually be auto
. Also see axis.lim
.
ylim : auto
| array
default: auto
Data limits along the -axis. Expects auto
or a tuple (min, max)
where min
and max
may individually be auto
. Also see axis.lim
.
xlabel : lq.label
| content
default: none
Label for the -axis. Use a label
object for more options.
ylabel : lq.label
| content
default: none
Label for the -axis. Use a label
object for more options.
grid : auto
| none
| dictionary
| stroke
| color
| length
default: auto
Options to apply to the grid. A stroke
, color
, or length
argument
directly sets the grid stroke while a dictionary
with the possible keys
stroke
, stroke-sub
, and z-index
gives more fine-grained control.
Setting this parameter to none
removes the grid entirely.
See grid
for more details.
xscale : str
| lq.scale
default: "linear"
Sets the scale of the -axis. This may be a scale
object or the name
of one of the built-in scales "linear"
, "log"
, "symlog"
.
yscale : str
| lq.scale
default: "linear"
Sets the scale of the -axis. This may be a scale
object or the name
of one of the built-in scales "linear"
, "log"
, "symlog"
.
xaxis : none
| dictionary
default: (:)
Configures the -axis through a dictionary of arguments to pass to the
constructor of the axis. See axis
for available options.
yaxis : none
| dictionary
default: (:)
Configures the -axis through a dictionary of arguments to pass to the
constructor of the axis. See axis
for available options.
margin : ratio
| dictionary
default: 6%
Configures the automatic margins of the diagram around the data. If set
to 0%
, the outer-most data points align tightly with the edges of the
diagram (as long as the axis limits are left at auto
). Otherwise, the
margins are computed in percent of the covered range along an axis (in
scaled coordinates).
The margins can be set individually for each side by passing a dictionary with the possible keys
left
,right
,top
,bottom
for addressing individual sides,x
,y
for left/right and top/bottom combined sides, andrest
for all sides not specified by any of the above.
cycle : array
default: petroff10
Style cycle to use for this diagram. Check out the cycles tutorial for more information. The elements of a style cycles should either be
- all functions as described in the tutorial, or
- all of type
color
in which case the color sequence is automatically converted to a style cycle, or - all of type
dictionary
with possible keyscolor
,stroke
, andmark
.
fill : none
| color
| gradient
| tiling
default: none
How to fill the data area.