Plotly Set Transparent Background Color
In this article, we will discuss how you can set a transparent background color for your plots.
Plotly Express Set Transparent Color
Let us learn how we can set a transparent background using Plotly Express. For this tutorial, we will use a simple pie chart, as shown in the following code:
The previous example code creates a pie chart of the most popular database systems in the world.
The resulting figure is shown below:
To create a transparent background, we can use the update_layout() function and bass the plot_bgcolor and paper_bgcolor transparent values.
Consider the example code shown below:
In the previous example code, we use the update_layout() function and pass the required properties as a dictionary.
Use the RGBA color scheme as it allows you to specify the alpha parameter when passing the color.
The previous code should return a figure as shown below:

Plotly Graph_Objects Set Transparent Background Color
One of the best ways to customize your plots is using Plotly’s graph_objects class. It allows you to specify a wide range of properties with custom values.
We can use this to create a plot with a transparent background.
For example, we can create a pie chart using the graph_objects.Pie class as shown in the code below:
In this case, we use the graph_objects to plot a Pie chart with the specified data.
To create a plot with a transparent background, we need to specify the plot_bgcolor and paper_bgcolor properties as a dictionary.
An example code is shown below:
Here, we define a variable called a dictionary holding two key-value pairs. This allows us to set the background color to transparent using the layout parameter of the go.Pie() class.
The resulting figure is shown below:
You can also use the update_layout function when working with graph_objects to update the plots.
Conclusion
In this tutorial, we explored how to set a transparent background for Plotly’s plots using Plotly Express and Plotly graph_objects. Examples were provided to understand these two methods better.
About the author

John Otieno
My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list
Plotly is an advanced visual artifact
Funnel chart is a very common chart in the field of sales, mainly used to analyze the loss and conversion in various stages. For example, in a certain mall, we counted the number of users at different stages to analyze the conversion rate:
- Mall UV: the number of daily visitors to the mall
- Number of searches: the number of users who have searched in the mall
- Number of subscribers: the number of subscribers
- Submit an order: How many users submit an order
- Click to pay: How many users click the pay button after submitting an order
- Payment success: the number of users that are finally paid successfully
From the beginning of the search number to the success of payment, there is a certain loss of users at each stage, the funnel graph can be a good display of this loss and conversion.
After bar charts, pie charts, and line charts, funnel charts should be the most frequently drawn chart I work on. Let’s draw a funnel diagram by simulating the user behavior of an e-commerce site.
The overall effect
Import libraries
It is implemented in two ways:
- Plotly_express: px.
- Plotly. Graph_objects: go
Implementation based on PX
Foundation funnel plot
Simulate a mall data:
Draw a basic funnel plot:
We can also add a color parameter color:
If our color is set to the number column, the numerical meaning might not be correct. It would be better to represent different stages instead.
Look at the generated funnel plot: the top is the payment success, usually we want the highest value at the top, so we flip the incoming data:
Grouping funnel
Put different groups of funnel plots together on a canvas. For example, look at the comparison between march of this year and March of 2020. This is called year-on-year
Year-over-year: a comparison of the same period, for example, March 2021 and March 2020
Sequential: a comparison of adjacent periods, for example, March 2021 and February 2021
1. Data from March 2020
2. Data in March 2021
3. Merge two sets of data using concat functions
4. Funnel diagram
Plot an area funnel
Again, use the top data:
We observe that the area funnel plot is drawn by default as a percentage, while the ordinary funnel plot is a numerical value
Implementation based on GO
Draw the base funnel
Change the color and border of the funnel plot
We need the use of the theme textInfo parameter, which can be used in three ways:
- Percent Initial: Relative to the initial value
- Percent Previous: Relative to the previous value
- Percent Total: Indicates the value relative to the overall value
The funnel plot above uses percent initial, which looks like this:
If percent previous:
Let’s look at how the first percentage is calculated:
Grouping funnel
In the graph above, both year-on-year (March 2020 and March 2021) and sequential (March and February 2021) can be observed.
Area of the funnel
Sets the color and border of the area funnel
Multiple groups of area funnels
We can also separate the funnel plots of different groups and put them on a large canvas:
Funnel plots are really useful for looking at how data is transformed at different stages. After all, leaders look at ? every month
You cottage, a sweet cottage. Cabin master, one hand code for survival, one hand cooking spoon to enjoy life, welcome your presence ?
Funnel Chart in Python
How to make funnel-chart plots in Python with Plotly.
This page in another language
Plotly is a free and open-source graphing library for Python. We recommend you read our Getting Started guide for the latest installation or upgrade instructions, then move on to our Plotly Fundamentals tutorials or dive straight in to some Basic Charts tutorials.
Introduction¶
Funnel charts are often used to represent data in different stages of a business process. It’s an important mechanism in Business Intelligence to identify potential problem areas of a process. For example, it’s used to observe the revenue or loss in a sales process for each stage, and displays values that are decreasing progressively. Each stage is illustrated as a percentage of the total of all values.
plotly.graph_objects .Funnel¶
Visualize stages in a process using length-encoded bars. This trace can be used to show data in either a part-to-whole representation wherein each item appears in a single stage, or in a “drop-off” representation wherein each item appears in each stage it traversed. See also the “funnelarea” trace type for a different approach to visualizing funnel data.
arg – dict of properties compatible with this constructor or an instance of plotly.graph_objects.Funnel
alignmentgroup – Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.
cliponaxis – Determines whether the text nodes are clipped about the subplot axes. To show the text nodes above axis lines and tick labels, make sure to set xaxis.layer and yaxis.layer to below traces.
connector – plotly.graph_objects.funnel.Connector instance or dict with compatible properties
constraintext – Constrain the size of text inside or outside a bar to be no larger than the bar itself.
customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements
customdatasrc – Sets the source reference on Chart Studio Cloud for customdata .
dx – Sets the x coordinate step. See x0 for more info.
dy – Sets the y coordinate step. See y0 for more info.
hoverinfo – Determines which trace information appear on hover. If none or skip are set, no information is displayed upon hovering. But, if none is set, click and hover events are still fired.
hoverinfosrc – Sets the source reference on Chart Studio Cloud for hoverinfo .
hoverlabel – plotly.graph_objects.funnel.Hoverlabel instance or dict with compatible properties
hovertemplate – Template string used for rendering the information that appear on hover box. Note that this will override hoverinfo . Variables are inserted using %
hovertemplatesrc – Sets the source reference on Chart Studio Cloud for hovertemplate .
hovertext – Sets hover text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. To be seen, trace hoverinfo must contain a “text” flag.
hovertextsrc – Sets the source reference on Chart Studio Cloud for hovertext .
ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.
idssrc – Sets the source reference on Chart Studio Cloud for ids .
insidetextanchor – Determines if texts are kept at center or start/end points in textposition “inside” mode.
insidetextfont – Sets the font used for text lying inside the bar.
legendgroup – Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.
legendgrouptitle – plotly.graph_objects.funnel.Legendgrouptitle instance or dict with compatible properties
legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with *reversed* `legend.traceorder they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items.
legendwidth – Sets the width (in px or fraction) of the legend for this trace.
marker – plotly.graph_objects.funnel.Marker instance or dict with compatible properties
meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace name , graph, axis and colorbar title.text , annotation text rangeselector , updatemenues and sliders label text all support meta . To access the trace meta values in an attribute in the same trace, simply use % where i is the index or key of the meta item in question. To access trace meta in layout attributes, use % where i is the index or key of the meta and n is the trace index.
metasrc – Sets the source reference on Chart Studio Cloud for meta .
name – Sets the trace name. The trace name appear as the legend item and on hover.
offset – Shifts the position where the bar is drawn (in position axis units). In “group” barmode, traces that set “offset” will be excluded and drawn in “overlay” mode instead.
offsetgroup – Set several traces linked to the same position axis or matching axes to the same offsetgroup where bars of the same position coordinate will line up.
opacity – Sets the opacity of the trace.
orientation – Sets the orientation of the funnels. With “v” (“h”), the value of the each bar spans along the vertical (horizontal). By default funnels are tend to be oriented horizontally; unless only “y” array is presented or orientation is set to “v”. Also regarding graphs including only ‘horizontal’ funnels, “autorange” on the “y-axis” are set to “reversed”.
outsidetextfont – Sets the font used for text lying outside the bar.
selectedpoints – Array containing integer indices of selected points. Has an effect only for traces that support selections. Note that an empty array means an empty selection where the unselected are turned on for all points, whereas, any other non-array values means no selection all where the selected and unselected styles have no effect.
showlegend – Determines whether or not an item corresponding to this trace is shown in the legend.
stream – plotly.graph_objects.funnel.Stream instance or dict with compatible properties
text – Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace’s (x,y) coordinates. If trace hoverinfo contains a “text” flag and “hovertext” is not set, these elements will be seen in the hover labels.
textangle – Sets the angle of the tick labels with respect to the bar. For example, a tickangle of -90 draws the tick labels vertically. With “auto” the texts may automatically be rotated to fit with the maximum size in bars.
textfont – Sets the font used for text .
textinfo – Determines which trace information appear on the graph. In the case of having multiple funnels, percentages & totals are computed separately (per trace).
textposition – Specifies the location of the text . “inside” positions text inside, next to the bar end (rotated and scaled if needed). “outside” positions text outside, next to the bar end (scaled if needed), unless there is another bar stacked on this one, then the text gets pushed inside. “auto” tries to position text inside the bar, but if the bar is too small and no bar is stacked on this one the text is moved outside. If “none”, no text appears.
textpositionsrc – Sets the source reference on Chart Studio Cloud for textposition .
textsrc – Sets the source reference on Chart Studio Cloud for text .
texttemplate – Template string used for rendering the information text that appear on points. Note that this will override textinfo . Variables are inserted using %
texttemplatesrc – Sets the source reference on Chart Studio Cloud for texttemplate .
uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.
uirevision – Controls persistence of some user-driven changes to the trace: constraintrange in parcoords traces, as well as some editable: true modifications such as name and colorbar.title . Defaults to layout.uirevision . Note that other user-driven trace attribute changes are controlled by layout attributes: trace.visible is controlled by layout.legend.uirevision , selectedpoints is controlled by layout.selectionrevision , and colorbar.(x|y) (accessible with config:
visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).
width – Sets the bar width (in position axis units).
x – Sets the x coordinates.
x0 – Alternate to x . Builds a linear space of x coordinates. Use with dx where x0 is the starting coordinate and dx the step.
xaxis – Sets a reference between this trace’s x coordinates and a 2D cartesian x axis. If “x” (the default value), the x coordinates refer to layout.xaxis . If “x2”, the x coordinates refer to layout.xaxis2 , and so on.
xhoverformat – Sets the hover text formatting rulefor x using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%
%S.%2f” would display * 09
23.46*By default the values are formatted using xaxis.hoverformat .
xperiod – Only relevant when the axis type is “date”. Sets the period positioning in milliseconds or “M<n>” on the x axis. Special values in the form of “M<n>” could be used to declare the number of months. In this case n must be a positive integer.
xperiod0 – Only relevant when the axis type is “date”. Sets the base for period positioning in milliseconds or date string on the x0 axis. When x0period is round number of weeks, the x0period0 by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.
xperiodalignment – Only relevant when the axis type is “date”. Sets the alignment of data points on the x axis.
xsrc – Sets the source reference on Chart Studio Cloud for x .
y – Sets the y coordinates.
y0 – Alternate to y . Builds a linear space of y coordinates. Use with dy where y0 is the starting coordinate and dy the step.
yaxis – Sets a reference between this trace’s y coordinates and a 2D cartesian y axis. If “y” (the default value), the y coordinates refer to layout.yaxis . If “y2”, the y coordinates refer to layout.yaxis2 , and so on.
yhoverformat – Sets the hover text formatting rulefor y using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for dates see: https://github.com/d3/d3-time- format/tree/v2.2.3#locale_format. We add two items to d3’s date formatter: “%h” for half of the year as a decimal number as well as “%
%S.%2f” would display * 09
23.46*By default the values are formatted using yaxis.hoverformat .
yperiod – Only relevant when the axis type is “date”. Sets the period positioning in milliseconds or “M<n>” on the y axis. Special values in the form of “M<n>” could be used to declare the number of months. In this case n must be a positive integer.
yperiod0 – Only relevant when the axis type is “date”. Sets the base for period positioning in milliseconds or date string on the y0 axis. When y0period is round number of weeks, the y0period0 by default would be on a Sunday i.e. 2000-01-02, otherwise it would be at 2000-01-01.
yperiodalignment – Only relevant when the axis type is “date”. Sets the alignment of data points on the y axis.
ysrc – Sets the source reference on Chart Studio Cloud for y .
plotly.graph_objects .funnel¶
Sets the fill color.
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
The ‘line’ property is an instance of Line that may be specified as:
-
An instance of plotly.graph_objects.funnel.connector.Line
-
A dict of string/value properties that will be passed to the Line constructor
Supported dict properties:
color
Sets the line color.
dash
Sets the dash style of lines. Set to a dash type string (“solid”, “dot”, “dash”, “longdash”, “dashdot”, or “longdashdot”) or a dash length list in px (eg “5px,10px,2px,2px”).
width
Sets the line width (in px).
Determines if connector regions and lines are drawn.
The ‘visible’ property must be specified as a bool (either True, or False)
class plotly.graph_objects.funnel. Hoverlabel ( arg = None , align = None , alignsrc = None , bgcolor = None , bgcolorsrc = None , bordercolor = None , bordercolorsrc = None , font = None , namelength = None , namelengthsrc = None , ** kwargs ) ¶ property align ¶
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines
-
One of the following enumeration values:
[‘left’, ‘right’, ‘auto’]
A tuple, list, or one-dimensional numpy array of the above
Sets the source reference on Chart Studio Cloud for align .
The ‘alignsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
Sets the background color of the hover labels for this trace
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
Sets the source reference on Chart Studio Cloud for bgcolor .
The ‘bgcolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
Sets the border color of the hover labels for this trace.
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
Sets the source reference on Chart Studio Cloud for bordercolor .
The ‘bordercolorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
Sets the font used in hover labels.
The ‘font’ property is an instance of Font that may be specified as:
-
An instance of plotly.graph_objects.funnel.hoverlabel.Font
-
A dict of string/value properties that will be passed to the Font constructor
Supported dict properties:
color
colorsrc
Sets the source reference on Chart Studio Cloud for color .
family
HTML font family — the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren’t available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include “Arial”, “Balto”, “Courier New”, “Droid Sans”,, “Droid Serif”, “Droid Sans Mono”, “Gravitas One”, “Old Standard TT”, “Open Sans”, “Overpass”, “PT Sans Narrow”, “Raleway”, “Times New Roman”.
familysrc
Sets the source reference on Chart Studio Cloud for family .
size
sizesrc
Sets the source reference on Chart Studio Cloud for size .
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to namelength — 3 characters and add an ellipsis.
An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807]
A tuple, list, or one-dimensional numpy array of the above
Sets the source reference on Chart Studio Cloud for namelength .
The ‘namelengthsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A list or array of any of the above
Sets the source reference on Chart Studio Cloud for color .
The ‘colorsrc’ property must be specified as a string or as a plotly.grid_objs.Column object
HTML font family — the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren’t available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include “Arial”, “Balto”, “Courier New”, “Droid Sans”,, “Droid Serif”, “Droid Sans Mono”, “Gravitas One”, “Old Standard TT”, “Open Sans”, “Overpass”, “PT Sans Narrow”, “Raleway”, “Times New Roman”.
A non-empty string
A tuple, list, or one-dimensional numpy array of the above
Sets the source reference on Chart Studio Cloud for family .
The ‘familysrc’ property must be specified as a string or as a plotly.grid_objs.Column object
An int or float in the interval [1, inf]
A tuple, list, or one-dimensional numpy array of the above
Sets the source reference on Chart Studio Cloud for size .
The ‘sizesrc’ property must be specified as a string or as a plotly.grid_objs.Column object
class plotly.graph_objects.funnel. Legendgrouptitle ( arg = None , font = None , text = None , ** kwargs ) ¶ property font ¶
Sets this legend group’s title font.
The ‘font’ property is an instance of Font that may be specified as:
-
An instance of plotly.graph_objects.funnel.legendgrouptitle.Font
-
A dict of string/value properties that will be passed to the Font constructor
Supported dict properties:
color
family
HTML font family — the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren’t available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include “Arial”, “Balto”, “Courier New”, “Droid Sans”,, “Droid Serif”, “Droid Sans Mono”, “Gravitas One”, “Old Standard TT”, “Open Sans”, “Overpass”, “PT Sans Narrow”, “Raleway”, “Times New Roman”.
size
Sets the title of the legend group.
A number that will be converted to a string
class plotly.graph_objects.funnel. Marker ( arg = None , autocolorscale = None , cauto = None , cmax = None , cmid = None , cmin = None , color = None , coloraxis = None , colorbar = None , colorscale = None , colorsrc = None , line = None , opacity = None , opacitysrc = None , reversescale = None , showscale = None , ** kwargs ) ¶ property autocolorscale ¶
Determines whether the colorscale is a default palette ( autocolorscale: true ) or the palette determined by marker.colorscale . Has an effect only if in marker.color is set to a numerical array. In case colorscale is unspecified or autocolorscale is true, the default palette will be chosen according to whether numbers in the color array are all positive, all negative or mixed.
The ‘autocolorscale’ property must be specified as a bool (either True, or False)
Determines whether or not the color domain is computed with respect to the input data (here in marker.color ) or the bounds set in marker.cmin and marker.cmax Has an effect only if in marker.color is set to a numerical array. Defaults to false when marker.cmin and marker.cmax are set by the user.
The ‘cauto’ property must be specified as a bool (either True, or False)
Sets the upper bound of the color domain. Has an effect only if in marker.color is set to a numerical array. Value should have the same units as in marker.color and if set, marker.cmin must be set as well.
An int or float
Sets the mid-point of the color domain by scaling marker.cmin and/or marker.cmax to be equidistant to this point. Has an effect only if in marker.color is set to a numerical array. Value should have the same units as in marker.color . Has no effect when marker.cauto is false .
An int or float
Sets the lower bound of the color domain. Has an effect only if in marker.color is set to a numerical array. Value should have the same units as in marker.color and if set, marker.cmax must be set as well.
An int or float
Sets the marker color. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to marker.cmin and marker.cmax if set.
A hex string (e.g. ‘#ff0000’)
An rgb/rgba string (e.g. ‘rgb(255,0,0)’)
An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)
An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
A number that will be interpreted as a color according to funnel.marker.colorscale
A list or array of any of the above
Sets a reference to a shared color axis. References to these shared color axes are “coloraxis”, “coloraxis2”, “coloraxis3”, etc. Settings for these shared color axes are set in the layout, under layout.coloraxis , layout.coloraxis2 , etc. Note that multiple color scales can be linked to the same color axis.
The ‘coloraxis’ property is an identifier of a particular subplot, of type ‘coloraxis’, that may be specified as the string ‘coloraxis’ optionally followed by an integer >= 1 (e.g. ‘coloraxis’, ‘coloraxis1’, ‘coloraxis2’, ‘coloraxis3’, etc.)
The ‘colorbar’ property is an instance of ColorBar that may be specified as: