I am playing with examples from plotly.express piechart help page and trying to add an extra element iso_num to the hover_data property (iso_num is an int64 column in the gapminder dataframe) Hovering over the slice of the pie chart then gives this: where iso num value is %{customdata[1]} instead of the numeric value from the column. What am I missing?
Tag: plotly
How to change color of text in plotly scatter and different marker?
I want use plot.ly to plot iris dataset. It has an color parameter in scatter data work like hue in seabron but it only change the color of marker and cant change the color of text and i cant find any why to change the marker type for each group of color. the code is : I want the text
How to change plotly figure size
I have made a scatter plot using matplotlib and Plotly. I want the height, width and the markers to be scatter as in matplotlib plot. Please see the attached plots. I used the following code in Plotly I try to tune the range but did not help. In addition, I use Autorange that did not help. Could you please help
Plotly: How to change the format of the values for the x axis?
I need to create a graph from data with python. I took my inspiration from various website and I’ve made this script : This script allow to generate this graph : For the x axe, I would like to display the value like that 2020-01-01-06:00 but when I change my list like that : The error is : If I
How to save plotly express plot into a html or static image file?
However, I feel saving the figure with plotly.express is pretty tricky. How to save plotly.express or plotly plot into a individual html or static image file? Anyone can help? Answer Updated answer: With newer versions of plotly, static Image export in Python is a breeze. Just make sure to install kaleido using: or, for Anaconda: And then run Filetypes such
Plotly: What color cycle does plotly express follow?
I would think that the default color cycle would be (some variants of) [‘blue’, ‘red’, ‘green’, ‘purple’, ‘orange’] like in the plot below: Plot 1: Code 1: At least that seems to be the order of the cycle since omitting Oceania from the continents will give you this: Now the order of the remaining colors are the same except for
Plotly-Express: How to fix the color mapping when setting color by column name
I am using plotly express for a scatter plot. The color of the markers is defined by a variable of my dataframe, as in the example below. When I add another instance of this variable, the color mapping changes (First, ‘virginica’, is red, then green). How can I keep the mapping of the colors when adding variables? Answer Short answer:
How to create subplots from each column in a pandas dataframe
I have a dataframe ‘df’ with 36 columns, these columns are plotted onto a single plotly chart and displayed in html format using the code below. I want to iterate through each column and create a subplot for each one. I have tried; I created 6 rows and columns as that would give 36 plots and tried to use the
Can’t figure out why graph is not updating
I’m setting up a plotly-dash website where I want to show data from some domains from different points in time. Therefore I have a slider with which you can decide which data from which point in time you want to see. That already works. Moreover I want that if somebody clicks on one point it shows a line between all
How can I search for the options for a particular property of a plotly figure?
The question In the figure below, the jagged shape of the line is set using ‘hvh’ as an argument for the shape property of the line. As a specific example for a more general case, let’s say that I’ve forgotten which porperty (or properites) that take ‘hvh’ as an argument. How can I search through the entire plotly figure to