I have been trying to change the marker shape in plotly scatter plot but I can't seem to find the correct options. The plotly document goes over the size and opacity, but not the marker shape. Here's my sample code-
import pandas as pd
import…
In the plotly website Map Configuration and Styling in Python is described how to automatically zoom a "Geo map":
import plotly.express as px
fig = px.line_geo(lat=[0,15,20,35], lon=[5,10,25,30]) # Creates a "Geo map"…
I am trying to plot something similar to the gif below using plotly, where an image is displayed when hovering on a point in the scatter plot, but I just don't know where to start.
Is it even possible to use plotly or will I have to use Bokeh?
Background: I am new to the Python world and am using Plotly for creating basic graphs in Python. I am using AWS Sagemaker's JupyterLab for creating the python scripts.
Issue: I have been trying to run the basic codes mentioned on Plotly's website…
I'm using plotly==4.5.1 in a jupyter==1.0.0 notebook, python==3.7.4.
The same piece of code which previous showed this:
Is now showing this, without having had any modifications:
Does anyone have any insights over why this might be? Is it…
Creating multiple subplots using plotly is both easy and elegant. Consider the following example that plots two series from a dataframe side by side:
Plot:
Code:
# imports
from plotly.subplots import make_subplots
import plotly.figure_factory as…
I have the following graph whose data (the position and the color values) come from an external source:
import plotly.graph_objs as go
from plotly.offline import init_notebook_mode, iplot
data = go.Scatter({
'hoverinfo': 'text',
'marker':…
I've made a plot, and I want to add a legend with some text in it.
Old link (now broken)
https://plot.ly/~smirnod1/4/roc-curve/
Edited link to similar plot:
https://plot.ly/~wonglynn2004/44/roc-plot-and-area-under-curve/#/code
Here is one example -…
I would like to replace Pandas with Polars but I was not able to find out how to use Polars with Plotly without converting to Pandas. I wonder if there is a way to completely cut Pandas out of the process.
Consider the following test data:
import…
I am drawing a correlation matrix of the Titanic dataset.
df_corr = df.corr()
Originally, the matrix looks like this:
fig = ff.create_annotated_heatmap(
z=df_corr.to_numpy(),
x=df_corr.columns.tolist(),
…
When I try to import plotly.express I get the error:
ImportError: Plotly express requires pandas to be installed.
The installation notes did not mention having to install anything additional. I can import plotly on its own, I only get the error…
I was able to force the default theme using
import plotly.io as pio
pio.templates.default = 'plotly_white'
But I am struggling to set a default color palette.
Any ideas how to change this?
Thanks
Is it possible to add some text on the same html file as my plotly graph?
For example :
This is the code that generates a graph :
data = pd.read_csv('file.csv')
data.columns = ['price', 'place', 'date']
fig = px.scatter(data, x = "place", y =…
Using Blender created this model
that can be seen in A-frame in this link
This model is great and it gives an overview of what I'm trying to accomplish here. Basically, instead of having the names, I'd have dots that symbolize one specific…