A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://plotly.com/python-api-reference/generated/plotly.html below:

plotly package — 6.2.0 documentation

Return an instance of plotly.graph_objects.Figure with the subplots domain set in ‘layout’.

Example 1: # stack two subplots vertically fig = tools.make_subplots(rows=2)

This is the format of your plot grid: [ (1,1) x1,y1 ] [ (2,1) x2,y2 ]

fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2])] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis=’x2’, yaxis=’y2’)]

# or see Figure.add_trace

Example 2: # subplots with shared x axes fig = tools.make_subplots(rows=2, shared_xaxes=True)

This is the format of your plot grid: [ (1,1) x1,y1 ] [ (2,1) x1,y2 ]

fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2])] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], yaxis=’y2’)]

Example 3: # irregular subplot layout (more examples below under ‘specs’) fig = tools.make_subplots(rows=2, cols=2,

specs=[[{}, {}],

[{‘colspan’: 2}, None]])

This is the format of your plot grid! [ (1,1) x1,y1 ] [ (1,2) x2,y2 ] [ (2,1) x3,y3 - ]

fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2])] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis=’x2’, yaxis=’y2’)] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis=’x3’, yaxis=’y3’)]

Example 4: # insets fig = tools.make_subplots(insets=[{‘cell’: (1,1), ‘l’: 0.7, ‘b’: 0.3}])

This is the format of your plot grid! [ (1,1) x1,y1 ]

With insets: [ x2,y2 ] over [ (1,1) x1,y1 ]

fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2])] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis=’x2’, yaxis=’y2’)]

Example 5: # include subplot titles fig = tools.make_subplots(rows=2, subplot_titles=(‘Plot 1’,’Plot 2’))

This is the format of your plot grid: [ (1,1) x1,y1 ] [ (2,1) x2,y2 ]

fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2])] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis=’x2’, yaxis=’y2’)]

Example 6: # Include subplot title on one plot (but not all) fig = tools.make_subplots(insets=[{‘cell’: (1,1), ‘l’: 0.7, ‘b’: 0.3}],

subplot_titles=(‘’,’Inset’))

This is the format of your plot grid! [ (1,1) x1,y1 ]

With insets: [ x2,y2 ] over [ (1,1) x1,y1 ]

fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2])] fig[‘data’] += [Scatter(x=[1,2,3], y=[2,1,2], xaxis=’x2’, yaxis=’y2’)]

Keywords arguments with constant defaults:

rows (kwarg, int greater than 0, default=1):

Number of rows in the subplot grid.

cols (kwarg, int greater than 0, default=1):

Number of columns in the subplot grid.

shared_xaxes (kwarg, boolean or list, default=False)

Assign shared x axes. If True, subplots in the same grid column have one common shared x-axis at the bottom of the gird.

To assign shared x axes per subplot grid cell (see ‘specs’), send list (or list of lists, one list per shared x axis) of cell index tuples.

shared_yaxes (kwarg, boolean or list, default=False)

Assign shared y axes. If True, subplots in the same grid row have one common shared y-axis on the left-hand side of the gird.

To assign shared y axes per subplot grid cell (see ‘specs’), send list (or list of lists, one list per shared y axis) of cell index tuples.

start_cell (kwarg, ‘bottom-left’ or ‘top-left’, default=’top-left’)

Choose the starting cell in the subplot grid used to set the domains of the subplots.

print_grid (kwarg, boolean, default=True):

If True, prints a tab-delimited string representation of your plot grid.

Keyword arguments with variable defaults:

horizontal_spacing (kwarg, float in [0,1], default=0.2 / cols):

Space between subplot columns. Applies to all columns (use ‘specs’ subplot-dependents spacing)

vertical_spacing (kwarg, float in [0,1], default=0.3 / rows):

Space between subplot rows. Applies to all rows (use ‘specs’ subplot-dependents spacing)

subplot_titles (kwarg, list of strings, default=empty list):

Title of each subplot. “” can be included in the list if no subplot title is desired in that space so that the titles are properly indexed.

specs (kwarg, list of lists of dictionaries):

Subplot specifications.

ex1: specs=[[{}, {}], [{‘colspan’: 2}, None]]

ex2: specs=[[{‘rowspan’: 2}, {}], [None, {}]]

insets (kwarg, list of dictionaries):

Inset specifications.

column_width (kwarg, list of numbers)

Column_width specifications

row_width (kwargs, list of numbers)

Row_width specifications


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4