Varying Row and Column Size
It is possible to change the row and column size by using the columnwidth parameter. The width of columns is expressed as a ratio. Columns fill the available width in the proportion of their specified column widths.
Example:
Python3
import plotly.graph_objects as go color1 = 'lightgreen' color2 = 'lightblue' fig = go.Figure(data = [go.Table( # Ratio for column width columnwidth = [ 1 , 5 ], header = dict (values = [ 'A' , 'B' ]), cells = dict (values = [[ 10 , 20 , 30 , 40 ], [ 40 , 20 , 10 , 50 ]], fill_color = [[color1, color2, color1, color2, color1] * 2 ],)) ]) fig.show() |
Output:
How to create Tables using Plotly in Python?
Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
Contact Us