@@ -1806,3 +1806,70 @@ on `the ecosystem page <https://pandas.pydata.org/community/ecosystem.html>`_.
18061806
18071807Developers guide can be found at
18081808https://pandas.pydata.org/docs/dev/development/extending.html#plotting-backends
1809+
1810+ Backend-Specific Plotting Arguments
1811+ ------------------------------------
1812+
1813+ Pandas provides a consistent ``plot `` API, but the availability and implementation of
1814+ optional arguments vary across different backends.
1815+
1816+ The following table outlines commonly used optional arguments and their alternatives
1817+ across different backends.
1818+
1819+ +-------------+------------------------------------+---------------------------------+
1820+ | Matplotlib | Plotly | Bokeh |
1821+ +=============+====================================+=================================+
1822+ | `color ` | `line.color ` | `line_color ` |
1823+ +-------------+------------------------------------+---------------------------------+
1824+ | `figsize ` | `fig.update_layout(width, height) ` | `plot_width `, `plot_height ` |
1825+ +-------------+------------------------------------+---------------------------------+
1826+ | `linewidth ` | `line_width ` | `line_width ` |
1827+ +-------------+------------------------------------+---------------------------------+
1828+ | `linestyle ` | `dash ` | `line_dash ` |
1829+ +-------------+------------------------------------+---------------------------------+
1830+ | `marker ` | `marker_symbol ` | Use Marker glyph (e.g., circle) |
1831+ +-------------+------------------------------------+---------------------------------+
1832+ | `alpha ` | `opacity ` | `line_alpha `, `fill_alpha ` |
1833+ +-------------+------------------------------------+---------------------------------+
1834+ | `legend ` | `showlegend ` | `legend_location ` |
1835+ +-------------+------------------------------------+---------------------------------+
1836+
1837+ **Example Usage: **
1838+
1839+ - **Matplotlib ** (default backend)
1840+
1841+ .. code-block :: python
1842+
1843+ >> > df.plot(
1844+ >> > kind = " line" , color = " red" , figsize = (8 , 5 ), linewidth = 2 , linestyle = " --" ,
1845+ >> > marker = " o" , alpha = 0.7 , legend = True
1846+ >> > )
1847+
1848+ - **Plotly **
1849+
1850+ .. code-block :: python
1851+
1852+ >> > pd.options.plotting.backend = " plotly"
1853+ >> > fig = df.plot(
1854+ >> > color = " red" , line_width = 2 , dash = " dash" , marker_symbol = " circle" ,
1855+ >> > opacity = 0.7 , showlegend = True
1856+ >> > )
1857+ >> > fig.update_layout(width = 800 , height = 500 )
1858+ >> > fig.show()
1859+
1860+ - **Bokeh **
1861+
1862+ .. code-block :: python
1863+
1864+ >> > pd.options.plotting.backend = " bokeh"
1865+ >> > df.plot(
1866+ >> > line_color = " red" , plot_width = 800 , plot_height = 500 , line_width = 2 ,
1867+ >> > line_dash = " dashed" , marker = " circle" , line_alpha = 0.7 ,
1868+ >> > legend_location = " top_right"
1869+ >> > )
1870+
1871+ For more details, refer to:
1872+
1873+ * `Matplotlib Documentation <https://matplotlib.org/stable/contents.html >`_
1874+ * `Plotly Documentation <https://plotly.com/python/ >`_
1875+ * `Bokeh Documentation <https://docs.bokeh.org/en/latest/ >`_
0 commit comments