Foresight.ziggurat Function
ziggurat(x; kwargs...)Plots a histogram with a transparent fill.
Key attributes:
linecolor = automatic: Sets the color of the step outline.
color = @inherit patchcolor: Color of the interior fill.
fillalpha = 0.5: Transparency of the interior fill.
filternan = true: Whether to remove NaN values from the data before plotting.
Plot type
The plot type alias for the ziggurat function is Ziggurat.
Attributes
alpha = 1.0 — The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5), will get multiplied.
bar_labels = nothing — Labels added at the end of each bar.
bins = 15 — Sets the number of bins if set to an integer or the edges of bins if set to an sorted collection of real numbers.
clip_planes = @inherit clip_planes automatic — Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes by passing Plane3f[].
color = @inherit patchcolor — Color of the histogram fill
colormap = @inherit colormap :viridis — Sets the colormap that is sampled for numeric colors. PlotUtils.cgrad(...), Makie.Reverse(any_colormap) can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients().
colorrange = automatic — The values representing the start and end points of colormap.
colorscale = identity — The color transform function. Can be any function, but only works well together with Colorbar for identity, log, log2, log10, sqrt, logit, Makie.pseudolog10, Makie.Symlog10, Makie.AsinhScale, Makie.SinhScale, Makie.LogScale, Makie.LuptonAsinhScale, and Makie.PowerScale.
cycle = :color => :patchcolor — No docs available.
depth_shift = 0.0 — Adjusts the depth value of a plot after all other transformations, i.e. in clip space, where -1 <= depth <= 1. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
direction = :y — Controls the direction of the bars. can be :y (height is vertical) or :x (height is horizontal).
fillalpha = 0.5 — Transparency of the histogram fill
fillto = automatic — Controls the baseline of the bars. This is zero in the default automatic case unless the barplot is in a log-scaled Axis. With a log scale, the automatic default is half the minimum value because zero is an invalid value for a log scale.
filternan = true — Whether to remove NaN values
flip_labels_at = Inf — Sets a height value beyond which labels are drawn inside the bar instead of outside.
fxaa = true — Adjusts whether the plot is rendered with fxaa (fast approximate anti-aliasing, GLMakie only). Note that some plots implement a better native anti-aliasing solution (scatter, text, lines). For them fxaa = true generally lowers quality. Plots that show smoothly interpolated data (e.g. image, surface) may also degrade in quality as fxaa = true can cause blurring.
gap = 0 — Sets the gap between bars relative to their width. The new width is w * (1 - gap).
highclip = automatic — The color for any value above the colorrange.
inspectable = @inherit inspectable — Sets whether this plot should be seen by DataInspector. The default depends on the theme of the parent scene.
inspector_clear = automatic — Sets a callback function (inspector, plot) -> ... for cleaning up custom indicators in DataInspector.
inspector_hover = automatic — Sets a callback function (inspector, plot, index) -> ... which replaces the default show_data methods.
inspector_label = automatic — Sets a callback function (plot, index, position) -> string which replaces the default label generated by DataInspector.
joinstyle = @inherit joinstyle — Controls the rendering at corners. Options are :miter for sharp corners, :bevel for "cut off" corners, and :round for rounded corners. If the corner angle is below miter_limit, :miter is equivalent to :bevel to avoid long spikes.
label_align = automatic — Sets the text alignment of labels.
label_color = @inherit textcolor — Sets the color of labels.
label_font = @inherit font — The font of the bar labels.
label_formatter = bar_label_formatter — Formatting function which is applied to bar labels before they are passed on text()
label_offset = 5 — The distance of the labels from the bar ends in screen units. Does not apply when label_position = :center.
label_position = :end — The position of each bar's label relative to the bar. Possible values are :end or :center.
label_rotation = 0π — Sets the text rotation of labels in radians.
label_size = @inherit fontsize — The font size of the bar labels.
linecap = @inherit linecap — Sets the type of line cap used. Options are :butt (flat without extrusion), :square (flat with half a linewidth extrusion) or :round.
linecolor = automatic — Color of the histogram steps
linestyle = nothing — Sets the dash pattern of the line. Options are :solid (equivalent to nothing), :dot, :dash, :dashdot and :dashdotdot. These can also be given in a tuple with a gap style modifier, either :normal, :dense or :loose. For example, (:dot, :loose) or (:dashdot, :dense).
For custom patterns have a look at Makie.Linestyle.
linewidth = @inherit linewidth — Sets the width of the line in screen units
lowclip = automatic — The color for any value below the colorrange.
miter_limit = @inherit miter_limit — Sets the minimum inner join angle below which miter joins truncate. See also Makie.miter_distance_to_angle.
model = automatic — Sets a model matrix for the plot. This overrides adjustments made with translate!, rotate! and scale!.
nan_color = :transparent — The color for NaN values.
normalization = :none — Sets the normalization applied to the histogram. Possible values are:
:pdf: Normalize by sum of weights and bin sizes. Resulting histogram has norm 1 and represents a probability density function.:density: Normalize by bin sizes only. Resulting histogram represents count density of input and does not have norm 1. Will not modify the histogram if it already represents a density (h.isdensity == 1).:probability: Normalize by sum of weights only. Resulting histogram represents the fraction of probability mass for each bin and does not have norm 1.:none: Do not normalize.
offset = 0.0 — Offsets all bars by the given real value. Can also be set per-bar.
over_background_color = automatic — Sets the color of labels that are drawn outside of bars. Defaults to label_color
over_bar_color = automatic — Sets the color of labels that are drawn inside of/over bars. Defaults to label_color
overdraw = false — Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
scale_to = nothing — Scales the histogram by a common factor such that the largest bin reaches the given value. This can also be set to :flip to flip the direction of histogram bars without scaling them.
space = :data — Sets the transformation space for box encompassing the plot. See Makie.spaces() for possible inputs.
ssao = false — Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true.
step = :pre — The step parameter can take the following values:
:pre: horizontal part of step extends to the left of each value inxs.:post: horizontal part of step extends to the right of each value inxs.:center: horizontal part of step extends halfway between the two adjacent values ofxs.
strokecolor = @inherit patchstrokecolor — Sets the outline color of bars.
strokewidth = @inherit patchstrokewidth — Sets the outline linewidth of bars.
transformation = :automatic — Controls the inheritance or directly sets the transformations of a plot. Transformations include the transform function and model matrix as generated by translate!(...), scale!(...) and rotate!(...). They can be set directly by passing a Transformation() object or inherited from the parent plot or scene. Inheritance options include:
:automatic: Inherit transformations if the parent and childspaceis compatible:inherit: Inherit transformations:inherit_model: Inherit only model transformations:inherit_transform_func: Inherit only the transform function:nothing: Inherit neither, fully disconnecting the child's transformations from the parent
Another option is to pass arguments to the transform!() function which then get applied to the plot. For example transformation = (:xz, 1.0) which rotates the xy plane to the xz plane and translates by 1.0. For this inheritance defaults to :automatic but can also be set through e.g. (:nothing, (:xz, 1.0)).
transparency = false — Adjusts how the plot deals with transparency. In GLMakie transparency = true results in using Order Independent Transparency.
visible = true — Controls whether the plot gets rendered or not.
weights = automatic — Sets optional statistical weights.
Makie.Linestyle Type
Linestyle(value::Vector{<:Real})A type that can be used as value for the linestyle keyword argument of plotting functions to arbitrarily customize the linestyle.
The value is a vector specifying the boundaries of the dashes in the line. Values 1 and 2 demarcate the first dash, values 2 and 3 the first gap, and so on. This means that usually, a pattern should have an odd number of values so that there's always a gap after a dash.
Here's an example in ASCII code. If we specify [0, 3, 6, 11, 16] then we get the following pattern:
# 0 3 6 11 16 3 6 11
# --- ----- --- -----