![]() Flexible Input Formats: PX functions accept input in a variety of formats, from lists and dicts to long-form or wide-form Pandas DataFrames to numpy arrays and xarrays to GeoPandas GeoDataFrames.Sensible, Overridable Defaults: PX functions will infer sensible defaults wherever possible, and will always let you override them. ![]() ![]() Every PX function returns a aph_objects.Figure object, so you can edit it using all the same methods like update_layout and add_trace. A single entry point into plotly: just import plotly.express as px and get access to all the plotting functions, plus built-in demo datasets under px.data and built-in color scales and sequences under px.color.The Plotly Express API in general offers the following features: Ternary Charts: scatter_ternary, line_ternary.Polar Charts: scatter_polar, line_polar, bar_polar.Outline Maps: scatter_geo, line_geo, choropleth.Tile Maps: scatter_mapbox, line_mapbox, choropleth_mapbox, density_mapbox.Multidimensional: scatter_matrix, parallel_coordinates, parallel_categories.2D Distributions: density_heatmap, density_contour.1D Distributions: histogram, box, violin, strip, ecdf.Part-of-Whole: pie, sunburst, treemap, icicle, funnel_area.Basics: scatter, line, area, bar, funnel, timeline.Plotly Express currently includes the following functions: Here is a talk from the SciPy 2021 conference that gives a good introduction to Plotly Express and Dash: Scroll down for a gallery of Plotly Express plots, each made in a single function call. The API for these functions was carefully designed to be as consistent and easy to learn as possible, making it easy to switch from a scatter plot to a bar chart to a histogram to a sunburst chart throughout a data exploration session. Plotly Express provides more than 30 functions for creating different types of figures. Any figure created in a single function call with Plotly Express could be created using graph objects alone, but with between 5 and 100 times more code. Throughout the plotly documentation, you will find the Plotly Express way of building figures at the top of any applicable page, followed by a section on how to use graph objects to build similar figures. Every Plotly Express function uses graph objects internally and returns a aph_objects.Figure instance. Plotly Express is a built-in part of the plotly library, and is the recommended starting point for creating most common figures. ![]() The plotly.express module (usually imported as px) contains functions that can create entire figures at once, and is referred to as Plotly Express or PX. ![]()
0 Comments
Leave a Reply. |