AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Scatter plot python 3d9/13/2023 ![]() We can set the title of the figure using the title argument. We can also change the axis to log scale using the log_x, log_y, and log_z arguments and set its value to true. We can set the opacity of the bubbles using the opacity argument and set its value from 0 to 1. We only changed the first two colors, and the rest of the colors will be from the default color sequence. See the code below.Ĭolor = 'species',color_discrete_map =) We can also add text inside each bubble using the text argument and set its value to a list of strings or a data frame column.įor example, let’s change the properties mentioned above. We can set the hover title for each bubble using the hover_name argument and set its value to a list of strings or a data frame column. We can set the size of each bubble using the size argument and set its value to a list of integers or a data frame column. The scatter_3d() function will use a color sequence to set the color of each bubble. ![]() We can give random color to each bubble using the color argument. In the case of a data frame, we can use the data_frame argument to pass the data inside the scatter_3d() function. ![]() ![]() We can also create a 3D scatter plot using a data frame. The width and height arguments are used to set the width and height of the above figure in pixels. scatter_3d(df, x = 'sepal_length', y = 'sepal_width', z = 'petal_width', ![]()
0 Comments
Read More
Leave a Reply. |