14,601
questions
1
vote
1
answer
17
views
Plotly indicator plot for specific values
Code bellow gives me plot for value 20 from 30.
How can I change max of this plot (in my example 30)?
library(plotly)
fig <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 1)),
value = 20,
...
1
vote
1
answer
32
views
How to change text color of facet category in plotly charts in Python?
I have created few Plotly charts with facets on basis of category variable and would like to change the color of facet text in the chart. Have searched alot even on plotly website but couldn't figure ...
0
votes
1
answer
29
views
Plotly Choropleth Map: Colors Not Mapping Correctly from Color Dictionary
I am trying to create a choropleth map using Plotly with a custom color dictionary, where specific states should be colored red and green. However, when trying to apply these colors, the chart is ...
1
vote
1
answer
22
views
Log axis in ploy_ly for R
I'm trying to make a 3D mesh plot with log x and y axis using plot_ly.
library(plotly)
help_plot_data <- data.frame(A_Conc = rep(c(1:100), times = 100),
B_Conc = rep(c(...
1
vote
1
answer
64
views
How can I use x0/dx in Plotly for a date-based x axis?
I happen to be using Plotly.js, but I suspect this is generic to Plotly across all platforms.
I'm trying to plot a scatter plot of voting intentions, with trend lines over time. There are relatively ...
0
votes
1
answer
29
views
Plotly KDE in histogram
I can create a histogram in Plotly like this:
import plotly.figure_factory as ff
import plotly.express as px
data = px.data.tips()["tip"]
ff.create_distplot([data], group_labels=["Tip&...
2
votes
0
answers
23
views
How to fix overlaying x axis in a plotly.js subplots?
I was trying to create a plot using plotly.js which have 2 subplots arranged in a grid with 8 tracks, 4 in each subplot. All track has separate y axis and shared x axis except one track which also ...
0
votes
1
answer
66
views
Trying to install version 0.1.0.post1 but not available on Azure App Service
I am using kaleido==0.1.0.post1 (which works on local) in my python plotly dash web app and deploying this on Azure App Service with the configuration of the app service as:
python: 3.12.6
pip: 24.2
...
2
votes
1
answer
34
views
geom_xspline not implemented in plotly - getting error message when using ggplotly() function (R)
I get an error message when trying to implement geom_xspline with
plotly in R.
I get the desired graph in ggplot2 but the plot cannot be converted to a
plotly object when using the ggplotly function.
...
0
votes
0
answers
19
views
Plotly-Resampler Not Resampling on Zoom Events in Flask-React Integration
I am experiencing an issue with the plotly-resampler in my Flask backend, which does not resample data as expected when zoom events are triggered in the React frontend. Despite adding an API endpoint ...
2
votes
1
answer
65
views
How to conditionally fill between two line charts with different colours using Plotly in Streamlit?
I'm trying to fill with colour the space between two line charts (between col1 and col2) as follows:
Desired output:
when col1 is above col2, fill with color green.
if col1 is under col2, fill with ...
0
votes
0
answers
32
views
How to capture clicked legends in Plotly?
I created a radar chart that displays data called zones. I am not able to make a callback function that returns the legends visible currently by user's action on the legend. When user deselects legend ...
0
votes
0
answers
20
views
Stack 2d heatmaps on top of each to create 3d tomography plot in python [duplicate]
I am trying to understand how to create 3D tomography plots in python. I have created a list of correlation matrices, and I want to plot each correlation matrix as a 2d heatmap, where the color ...
1
vote
1
answer
23
views
How to correctly mask section of a cylindrical surface in Plotly 3D surface plot?
I’m trying to plot a 3D cylindrical pipe using Plotly in Python, and I want to exclude a section of the pipe based on angle. I’m using np.nan to mask the values in the array, but I’m facing issues ...
1
vote
0
answers
30
views
Finding Mean of Y_Var user input in Shiny using Plotly
I am hitting a roadblock in trying to find the mean value of the Y Axis of user input in plotly. I am making a shiny app and I need to be able to allow users to select different combinations of ...
2
votes
1
answer
55
views
Incorrect z-values in plotly
I want to plot a surface $f(x,y) = x^2+2x-y$ and its tangent plane at point $(0,3,-3)$ but the code does not give the correct plot.
library(plotly)
x <- seq(from = -3, to = 3, length.out = 100)
y &...
0
votes
1
answer
45
views
How to adjust text labels and color gradient in ggplotly stacked bar-chart?
When I convert my ggplot stacked bar chart to ggplotly, there are two issues that I can't solve:
the text labels at the end of the bars change position unexpectedly. I would like them to keep their ...
0
votes
0
answers
39
views
no kaleido source distribution or wheel for uv on current platform
kaleido does not seem to work currently in a uv venv.
is there a workaround?
tried to output plotly static figs to .jpg
this depends on kaleido
Example:
f = px.scatter(
x=[1,2,3],
y=[4,5,6]
)
...
1
vote
1
answer
35
views
Plotly add_image vs add_layout_image
In Plotly, both figure.add_image and figure.add_layout_image allow you to add an image to a chart. It seems like add_layout_image is intended for "cosmetic" images that shouldn't belong to a ...
0
votes
0
answers
19
views
ggplot2 error: 'object 'days_after_grounding' not found' when building plot, despite column existing in dataset [duplicate]
Apologies for any mistakes, I'm new to R. I'm trying to create an animated plot using ggplot2 and plotly in R, but I'm encountering an error that I can't resolve. Here's my code:
ggplot(...
0
votes
0
answers
15
views
Redundant Y-axis on plotly Box chart where color attribute is set
I tried to differentiate a single point in a "beeswarm" chart to see its location in a distribution. But setting color and color_discrete_map spreads out the dots; they seem to follow some ...
0
votes
0
answers
38
views
Why is the line border colour of a portion of a Plotly Go pie slice two seperate colours?
I am trying to create a pie chart using Plotly.Go and place it into a Streamlit app. My pie chart is basically complete, and just requires a border colour around each differing slice. I was able to ...
1
vote
2
answers
24
views
Insert image with border in Plotly
To create a plotly scatter plot with images at each point, we can do:
import plotly.express as px
from PIL import Image
xs = [0, 1, 2]
ys = [0, 1, 4]
images = [Image.open("a.png"), Image....
0
votes
0
answers
20
views
missing xaxis ticks with plotly
I have a pandas dataframe with hourly data shown in 7 subplots for a weeks data.
fig = make_subplots(
rows=7,
cols=1,
subplot_titles=subPlotNames,
shared_xaxes=True,
shared_yaxes='...
1
vote
1
answer
24
views
PlotlyJS 'scatter3D' not working outside ng serve
I basically have two Plotly-charts, one 'scattergl' and one 'scatter3d'.
If I am using ng serve everything works fine and both charts are shown perfectly. The trouble begins if I use ng build and ...
0
votes
1
answer
68
views
Problem in ggplot2 with color and shape variables combining into a concatenated legend [closed]
So I have a plot which I'm trying to have the points colored by type1 and the shape shaped by note1 etc. For some reason, the plot is concatenating the dang things into a key like this:
type1
note1
- -...
0
votes
1
answer
30
views
Plotly express issue: box plosts shifted on the x axes when facetting
I am experiencing an unexpected behavior with plotly express when trying to plot a number of groups as facet box plot
import pandas as pd
import numpy as np
# Generate random data
np.random.seed(0) #...
-1
votes
0
answers
40
views
How do I make the bars visible in a plotly bar chart animation?
I'm trying to make a bar chart animation that slowly shows each bar, but I can't make it work as intended. When I run the code, the bar appears extremelly thin and then disappears to show the next ...
0
votes
0
answers
16
views
Issue with downloading react application component with html2pdf
I am facing an issue while using html2pdf with react application component which is crashing whenever save button for html2pdf function is called.
I have tried react-to-pdf and html2pdf.js both of ...
1
vote
0
answers
23
views
Plotly.js component not re-rendering in React when state changes
I'm using react-plotly.js to render a plot in my React application. I have a Zustand store to manage the state of my plot data and layout. When I click a button to fetch new data and update the state, ...
1
vote
2
answers
60
views
How to plot 4D graphs using plotly?
I'm trying to figure out a way to plot my 4D data using plotly, and it looks crazy to me that there are no references online for this.
What I'm trying to achieve is a simple interface with 3 drop-down ...
0
votes
0
answers
19
views
Rendering error with Plotly and Jupyterlab
I started getting the following error ("started" as in "it appeared without me changing any package or other setup aspect"):
File ~/venv/telematics_py311/lib/python3.11/site-...
0
votes
1
answer
18
views
Two stacked area plots on the same chart
Plotting assets
I'm plotting $MSTR assets as follows
fig = px.area(df_all, x='end', y='val', color='fact', title=f'{symbol.upper()} : Balance sheet', width=1000, height=600)
fig.add_trace(go.Scatter(...
0
votes
1
answer
24
views
Plotly: Increasing figure size to make room for long footnote
Building on the example in this thread, I have the following code:
import plotly.express as px
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent....
1
vote
0
answers
30
views
Plotly Limited WebGL instances when using subplots
I'm trying to produce a figure using Python and plotly, it's meant to consist of a considerably large number (>=25) of subplots, each of which is a 3D surface plot.
I am running into issues with my ...
3
votes
1
answer
57
views
Remove unused node in python plotly
What im trying here is to create a relationship between Tasks. Some of them are connected directly to each other while others are passing through this big box i circled instead of connecting directly(...
0
votes
1
answer
259
views
Kaleido RuntimeError
I create a virtual environment using
python3 -m venv venv
Activate
source venv/bin/activate
Install Plotly package
pip install plotly
Try to run the following script dft.py
#!./venv/bin/python3
...
0
votes
0
answers
24
views
How do I visualize/render 3D poliastro plots in vscode?
I am learning the poliastro code library and using VSCode. I am still considered new to Python. I am having trouble following the tutorial for 3D plotting in poliastro. Whenever I try to visualize the ...
1
vote
2
answers
34
views
Plotting Intersecting Planes in 3D Space Plotly
I'm trying to plot 3 planes in 3D space using plotly, I can only define a surface along the XY plane, whilst ZY and XZ do not appear.
I'm including a simple example below, I would expect the code to ...
0
votes
0
answers
26
views
How to plot multiple Y axis in data vizualization in R Plotly
I am trying to write a code which will plot multiple variables on a graph when the variables are clicked. The language is R and I am using Shiny to create an app. The following one is a sample.
...
0
votes
1
answer
42
views
Autoplot(ly): how can labels appear when hovering over points
I am trying to figure out how to label the points in a graph such that the label appears only when hovering over the point but not otherwise.
Consider the following reproducible example:
library(...
1
vote
1
answer
29
views
A sunburst plot produced by R's plot_ly function shows a blank page
There is no way to produce a sunburst plot in R with this data using the plot_ly function from the plotly package.
library(plotly)
df <- data.frame(
Valutazione = c('1 stella', '2 stelle', '3 ...
0
votes
1
answer
35
views
How to make bars more visible while using plotly?
I am trying to plot some data using plotly graph_objects. X axis has dates as categories and Y axis has depth values. I realized my graph becomes less visible when there is a relevant quantity of data....
1
vote
1
answer
49
views
Plotly Python: How to properly add shapes to subplots
How does plotly add shapes to figures with multiple subplots and what best practices are around that?
Let's take the following example:
from plotly.subplots import make_subplots
fig = make_subplots(...
0
votes
1
answer
29
views
Quarto dashboard duplicate chart
I'm creating a simple dashboard with Quarto in Python. When I insert a chart with plotly like the example below, the chart gets duplicated, probably due to fig.update_layout and fig.update_traces.
I’...
0
votes
1
answer
21
views
Why legend.position does not work in renderPlotly Rshiny
I want this bar chart to have legend at the top of the chart. When I ran the following code in Rstudio, the legend does appear at the top. However, when I put it in Rshiny via renderPlotly, legend is ...
1
vote
1
answer
29
views
plotly is not updating the info correctly with dropdown interactivity
I'm facing an issue with updating the median line on a plotly scatter plot when interacting with a dropdown. The dropdown allows the user to select a column (Y-axis), and I want the median of the ...
1
vote
1
answer
117
views
create a streamlit app to display a pivot table as a drill down
I am trying to create a streamlit app where i have a compliance table as below:
docid salesrep customer warehouse saledate deliverydate compliance
doc1 abc. cus1. wh1. 11/1/2024. 11/10/...
0
votes
1
answer
28
views
Plotly only plots in grey
When I generate a graph using plotly, there is no color. All graphs are grey. They look and interact fine, except it's like I set all the colors to the same shade of grey. For instance, if I run the ...
1
vote
0
answers
25
views
Flexdashboard in R Markdown: Plotly Plots Get Cut Off Inside Tabset on Grid Layout
I am trying to use the grid layout to create a flexdashboard. I would like to use tabsets in one of the grid sections to display multiple plots. However, when I do this, it seems that the tabs take up ...