> For the complete documentation index, see [llms.txt](https://visual-python.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visual-python.gitbook.io/docs/visualization/5.-plotly.md).

# 5. Plotly

<figure><img src="/files/8X8R71nsr6EB7ky6mhnK" alt="" width="343"><figcaption></figcaption></figure>

1. Select ***Plotly*** in the ***Visualization*** category.

<figure><img src="/files/Jm41RtM7sNTnZs54Mr4A" alt="" width="563"><figcaption></figcaption></figure>

2. ***Import Package***: Install the package you need to run your code (Plotly).
3. ***Import Library***: Import the libraries needed to run your code.
4. ***Preview***: You can preview the graph that will be generated.
5. ***Code View***: You can preview the code that will be generated.
6. ***Run***: Print and run the code.

***

[Data](#data)

[Info](#info)

[Code](#code)

***

### Data

<figure><img src="/files/3zFvzMOz4h7MQqmWPmJ9" alt="" width="563"><figcaption></figcaption></figure>

1. ***Chart Type***: Select the type of graph.
2. ***Data***: Select the data you want to graph. To select a specific column, use the funnel icon. If you want to set X and Y separately, check ***Set X and Y individually**.*
3. ***Axis Value***: Select the data you want to use for each axis.
   1. ***Values (Pie Chart)***: Select the data to represent the size of each section.
   2. ***Names (Pie Chart)***: Select the data to represent the name of each section.
   3. ***Parents (Sunburst)***: *Sunburst* charts represent hierarchical data in a circle; select the data that represents the parent section to which each segment belongs.
4. ***Color***: You can check ***Use Color** to* enable the use of color and select a color for the graph.
5. ***Sort***: Specify the order of the categories on the X-axis. Descending order sorts from the column with the most data to the column with the least.
6. ***User Option***: You can add additional code beyond the functionality provided by Visual Python.

***

### Info

<figure><img src="/files/hXMr8aBi3umgS2NPtrzy" alt="" width="563"><figcaption></figcaption></figure>

1. ***Title***: Set a title for the figure.
2. ***Label***: Set a name for each axis.

***

### Code

<figure><img src="/files/SgIUuDIZxBNASJeUcwQj" alt="" width="563"><figcaption></figcaption></figure>

1. You can add additional code beyond what Visual Python provides.
