I'm trying to change the default color of a fillcolor in Plotly to another transparent one, but when I change the fillcolor it is not transparent anymore.
trace = (go.Scatter(x=[30,45],y=[3000,3000],
fill='tozeroy',
# …
https://plotly.com/python/line-and-scatter/ has many scatter plot examples, but not a single one showing you how to set all the points' colours within px.scatter:
# x and y given as DataFrame columns
import plotly.express as px
df = px.data.iris() #…
These resources show how to take data from a single Pandas DataFrame and plot different columns subplots on a Plotly graph. I'm interested in creating figures from separate DataFrames and plotting them to the same graph as subplots. Is this possible…
Since November 2015, plotly is Open-Source and available for python. https://plot.ly/javascript/open-source-announcement/
When trying to do some plots offline, these work in iPython Notebook (version 4.0.4)
But if I try to run them in Spyder…
Plotly Express has an intuitive way to provide pre-formatted plotly plots with minimal lines of code; sort of how Seaborn does it for matplotlib.
It is possible to add traces of plots on Plotly to get a scatter plot on an existing line plot.…
This is my code:
fig = go.Figure(
data=go.Heatmap(z=z_values, y=[str(x) for x in params_1], x=[str(x) for x in params_2]),
layout=go.Layout(
title="Analysis results",
xaxis=dict(title='Diameter'),
…
plotly.express is very convenient to produce nice interactive plots. The code below generates a line chart colored by country. Now what I need is to add points to the plot. Does anyone know how I can add points to the line chart?
import…
I'm trying to plot a bar chart using plotly and I wanted to add a caption and subtitle.(Here you can take any example of your choice to add caption and subtitle)
My code for plotting the bar chart:
import plotly.graph_objects as go
fig =…
How can I change the x and y-axis labels in plotly because in matplotlib, I can simply use plt.xlabel but I am unable to do that in plotly.
By using this code in a dataframe:
Date = df[df.Country=="India"].Date
New_cases =…
I made a line graph with the code below and I'm trying to add a horizontal line at y=1. I tried following the instructions on the plotly site but it is still not showing. Does anyone know why?
date = can_tot_df.date
growth_factor =…
I'm looking for a way to set all markers in a Plotly Express scatter plot to the same size.
I want to specify that fixed size myself.
I know you can use a variable to set as size of the markers (with px.scatter(size='column_name'), but then they…
Despite the clear guidance on How do I ask a good question? and How to create a Minimal, Reproducible Example, many just seem to ignore to include a reproducible data sample in their question. So what is a practical and easy way to reproduce a data…
I have a scatter plot made with plotly (specifically offline plotly with the Python API on a Jupyter Notebook) and as you know, plotly makes it easy for the user to zoom and frame specific areas, but I'd like the plot to start already focussed on a…
I am trying to plot a selected marker for each of my traces in plotly. I would like to assign the same color to marker and line. Is there a way how to get the color attribute of my traces?
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[0, 1, 2,…