# The call is `bbox(x, y, width, height, origin.)`, where numbers are treated as # We set the (optional) position relative to bottom-right of the 1st subplot. # Create a filled contour and boxplot side by side. Using StatsPlots, StatsPlots.PlotMeasures h_anchor/ v_anchor define what the x/ y inputs of the bounding box refer to. Use px/ mm/ inch for absolute coords, w/ h for percentage relative to the parent. inset_subplots takes a list of (parent_layout, BoundingBox) tuples, where the bounding box is relative to the parent. Title =, titleloc = :right, titlefont = font(8)Ĭreate inset (floating) subplots using the inset_subplots attribute. Layout = l, legend = false, seriestype = , The symbols themselves ( a and b in the example below) can be any valid identifier and don't have any special meaning. Precise sizing can be achieved with curly brackets, otherwise the free space is equally split between the plot areas of subplots. The macro is the easiest way to define complex layouts, using Julia's multidimensional Array construction as the basis for a custom layout syntax. Titles and labels can be easily added: plot(rand(100,4), layout = 4, label=, More complex grid layouts can be created with the grid(.) constructor: plot(rand(100, 4), layout = grid(4, 1, heights=)) Pass a tuple to layout to create a grid of that size: # create a 4x1 grid, and map each of the 4 series to one of the subplots Pass an integer to layout to allow it to automatically compute a grid size for that many subplots: # create a 2x2 grid, and map each of the 4 series to one of the subplots (For example: a line or a set of markers) Series: One distinct visualization of data.Plot Area: The part of a subplot where the data is shown.Axis: One axis of a subplot, containing axis guide (label), tick labels, and tick marks.Subplot: One subplot, containing a title, axes, colorbar, legend, and plot area. ![]() It's helpful at this point to review terminology: Just set the layout keyword in a call to plot(.) Care has been taken to keep the framework flexible and generic, so that backends need only support the ability to precisely define the absolute position of a subplot, and they get the full power of nesting, plot area alignment, and more. As of v0.7.0, Plots has taken control of subplot positioning, allowing complex, nested grids of subplots and components.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |