Carpet Plots using Plotly in Python
A 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.
A carpet plot is any of a few different specific types of plot. A carpet plot is one that shows the interaction between two or more independent variables and one or more dependent variables in a two-dimensional plot. The carpet plot distinguishes itself from other plots as carpet plot can be used to more accurately interpolate data points. It can be created using the Carpet() method of graph_objects class.
Syntax: plotly.graph_objects.Carpet(a=None,b=None,carpet=None, x=None, y=None)
a: An array containing values of the first parameter value
b: An array containing values of the first parameter value
x: A two dimensional array of x coordinates at each carpet point. If ommitted, the plot is a cheater plot and the xaxis is hidden by default.
y: A two dimensional array of y coordinates at each carpet point.
carpet: An identifier for this carpet, so that scattercarpet and contourcarpet traces can specify a carpet plot on which they lie
Adding a and b values
A and B attributes should be used to save the parameter values.
Set A and B Axis
aaxis and baxis lists are used to set A and B axis respectively.
Example 2: Styling A and B axis