Questions tagged [plotly]
Plotly is an open source, high-level, declarative charting library, built on top of d3.js and stack.gl. It ships with over 40 chart types, including 3D charts, statistical graphs, and SVG maps. It powers plotly.py, plotly.r, and many more packages in different programming languages.
plotly
14,510
questions
0
votes
1
answer
14
views
How to remove the large left and right paddings due to "lines+markers" lines?
How to remove the large left and right paddings due to "lines+markers" lines?
import numpy as np
import pandas as pd
import plotly.graph_objects as go
count = 100
df = pd.DataFrame(
{
...
0
votes
0
answers
39
views
Create a function that converts a dataframe into a format suitable for a treemap structure
I want to create a treemap for a dataframe using the Plotly package. For this purpose, I need to create a function that converts the dataframe into a format suitable for a treemap structure. On the ...
1
vote
0
answers
23
views
Dash Python: @Callback in Layout function not being called
I have a simple dataframe:
df = pd.DataFrame({'Class1': [1, 2, 3, 4, 5],
'Class2': [6, 7, 8, 9, 10]})
I have created a data extraction function that splits the data ...
0
votes
1
answer
21
views
How do i shift the axis of a chart in plotly
I'm trying to make this ridgeplot chart in plotly and its mostly working ok, but for some reason the top trace is getting cut off and i can't figure out how to move the trace down a bit. I can do it ...
1
vote
1
answer
23
views
Slow rendering time | Plotly with Typescript React
I am trying to render a large dataset with plotly. I am plotting a temperature and depth line. When the number of data points is ~100,000 it is unusably slow. However when it has ~85,000 points it ...
1
vote
1
answer
31
views
How to remove the large top and bottom paddings due to top-to-bottom lines?
How to remove the large top and bottom paddings due to top-to-bottom lines?
import numpy as np
import pandas as pd
import plotly.graph_objects as go
count = 100
df = pd.DataFrame(
{
&...
0
votes
1
answer
27
views
How to change scatter point color in plotly if exceed/ in between horizontal and vertical lines
Is it possible to change the specific scatter point color in a plot when values is in between the horizontal and vertical line in plot?
Example:
Horizonal Line and Vertical Line Code
Here is the ...
1
vote
1
answer
27
views
Cannot add a vertical line to the second X axis
I can add a horizontal line to the second Y axis, like this:
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
df = pd.DataFrame(
{
"A": [5, 4, 7]...
0
votes
1
answer
25
views
How to change state border color in R Plotly choropleth map?
I have replicated the choropleth map for discrete colors in R using the method suggested in this link: How to create a chloropleth map in R Plotly based on a Categorical variable?
However, as you will ...
1
vote
0
answers
24
views
Two dropdown menus to select Y and Y2 axes independently
I am trying to generate a plot which has independent dropdown menus for both Y and Y2 axes. I am able to implement a dropdown for either the Y1 or Y2 axis when the other is static. I have also ...
2
votes
1
answer
44
views
How to display a custom color for NA values in an R Plotly choropleth map?
I would like to change the fill color of NA values in a choropleth r plotly interactive map from white (or transparent?) to light gray. This is for an R Shiny application, so I would like to retain ...
0
votes
0
answers
26
views
dash app behavior has suddenly changed from reading a ".cfg" to trying to download it
I have been running a dash app in which I've kept files to be read under the assets directory. But now all of a sudden, when I select a *.cfg file (specifically, this one) I'm prompted to download it ...
0
votes
1
answer
39
views
Dash Python: Layout Function combined with @Callback
page1.py
import ... .layout as layout
import dash
import pandas as pd
dash.register_page(__name__, path='/page_one') # I have an app.py which is running the app
df = pd.DataFrame({'A': [1, ...
0
votes
0
answers
13
views
Highlight areas of interactive time series plotly plot where y is greater than defined threshold and annotate them
I would like to highlight sections of plotly plot that have values higher than a certain threshold and annotate them. As I am manually screening each highlighted area on the plots is there a way I can ...
1
vote
1
answer
49
views
FastAPI: How to handle Plotly graph click events in a web application?
I am using FastAPI to create a simple web app where I want to render a Plotly graph and record the (x, y) values when the graph is clicked. I am exporting the graph and then trying to set up an event ...