15,658 questions
2
votes
1
answer
110
views
R plotly + crosstalk: filtering multiple datasets on a single ggplotly plot
I'm trying to use the R packages crosstalk and plotly (along with tidyverse packages) to create a panels that displays multiple data sets together. There's two data frames that I want to put into one ...
0
votes
0
answers
31
views
Plotly Choropleth not showing with Geopandas
I've seen this issue come up in other pages but none of their solutions worked for me.
import plotly.express as px
import geopandas as gpd
import cartopy.crs as ccrs
regions = gpd.read_file("...
1
vote
2
answers
43
views
How to avoid Plotly (plotly.express.line) line chart creating zig-zag line?
I want to create line charts with plotly, my X axis is a year, y a value. Sometimes, the data is incomplete, i.e., some curves will have years missing or will start in different years than others.
It ...
Advice
0
votes
0
replies
46
views
List of paths and sizes to sunburst plot
I have the following data format:
foo0/bar0/a0/b0/c0 50
foo0/bar0/a0/b1 30
foo1/bar0/a0/b0 10
foo1/bar1 20
foo1/bar2/a0/b0/c0 20
foo1/bar2/a0/b0/c1 30
I'd like to create a sunburst plot out of this. ...
Best practices
0
votes
2
replies
72
views
Index timestamp shiny for python
def prepare_dataframe(df):
df.rename(columns={
'Bomba Calor - Temperatura de Aire (°C)': 'temp_aire',
'Bomba Calor - Temperatura Entrada (°C)': 'temp_entrada',
'Bomba Calor ...
Advice
4
votes
4
replies
156
views
Ridgeplot with area charts in plotly (or any other free python library)
I'm trying to create a chart, that looks like a Ridgeplot (for examples see this and this), but has smoothed Area charts with a categorical x-axis as a basis.
Why standard Ridgeplot libraries don't ...
1
vote
1
answer
250
views
How can I render plotly plots without using plotlyOutput and renderPlotly?
I have a datatable that contains plots. Is there a way to just render it without having to use plotlyOutput and renderPlotly? In my real app the plots drawn will be dependent on context and I do not ...
1
vote
1
answer
47
views
Plotly/Dash rangeselector "All" button extends x-axis into future despite no data
I'm building a time series plot using Plotly with Dash, and I'm running into a frustrating issue with the x-axis.
Python Version: 3.10.16
Plotly Version : 6.0.0
Pandas Version : 2.2.3
My setup:
The ...
1
vote
1
answer
68
views
python plotly scatter ols trendline has a kink in it
I am using plotly express to model some data, and wanted to add a trendline = 'ols' to it.
when I do, I obtain a kink in the result
here is the code used:
d={'category': {63: 'test', 128: 'test', 192:...
2
votes
1
answer
92
views
Legend changes when converting ggplot2 plot to plotly while using multiple "aes labels" [duplicate]
I created a plot using ggplot2 with two different aesthetics for colour and shape. When I convert the ggplot2 plot to plotly via plotly::ggplotly() the different aes seem to create problems.
library(...
1
vote
1
answer
72
views
Add range to rangeslider in Plotly R
I would like to add an initial range to the rangeslider option in plotly r. Apparently, we could use the range argument for this based on the documentation. Here is a simple reproducible example:
...
1
vote
1
answer
74
views
Plotly R: Annotations showing fixed X values on hover despite recalculating closest points across subplots
I'm working with a Plotly figure in R that has 3 subplots sharing the same Y-axis (using subplot() with shareY = TRUE). I've implemented custom hover behavior using onRender() that:
Draws a ...
2
votes
1
answer
73
views
Combine stacked bars with non-stacked bars as overlay in r plotly
How can I combine stacked bars with non-stacked bars as overlay, using plotly in r?
In order to have the traces stacked, I have to define the barmode as stacked in the layout argument. But how can I ...
0
votes
0
answers
53
views
interactive matplotlib as webapplication
I am currently trying to create an interactive web-app to display and work with multi-graphs, ideally with streamlit. I have a first working version based on matplotlib (inspired by the netgraph ...
1
vote
1
answer
85
views
plotly write_image fails and hangs on Windows with python 3.11
We're currently unable to use plotly write_image. A stacktrace is thrown and the terminal completely hangs (it doesn't even respond to control + C). This is related to kaleido and I've seen a number ...
4
votes
2
answers
170
views
"X Unified" Hovermode and Show X Value
I'm working on a project using ggplotly() and am having trouble formatting my hover text. Specifically, I'm using the text aesthetic to format my tooltip, which works great. The problem I'm running ...
2
votes
1
answer
116
views
Dropdown menus 'move' when clicked
I am trying to make a basic bar plot with filters using plotly. I have two dropdown menus, and when the window is resized and the dropdowns are clicked they 'move', or appear to move with the axis.
...
0
votes
0
answers
70
views
plotly Dashboard refer to different plot
I have a question regarding how does Dashboard know which plot to display.
Sample code:
from dash import Dash, dcc, html, Input, Output
import plotly.express as px
import pandas as pd
# Sample data
...
2
votes
1
answer
72
views
Fast plotly updating inside Jupyter
I am running a Jupyter notebook inside VSCode. I want to use plotly (or anything else, but I am trying this as a potential solution) to dynamically plot data as it is generated.
I tried to generate a ...
2
votes
1
answer
95
views
graph_objects.Surface axis tic spacing inconsistent on x and y
Given hemi.csv data of:
244,1000,1500,2000,2500,3000,3500,5000
0,14,18,-42,-72,-84,-86,-94,-119
12.5,277,231,185,139,144,150,161,158
25.1,416,394,370,348,361,374,404,396
37.6,483,587,633,653,566,585,...
3
votes
1
answer
115
views
Legend grouping not working with fig.add_shape
I’m using Plotly to create some subplots, where I have several vertical lines and shapes that I want to toggle at the same time. The vertical lines were plotted using traces, so the legendgroup worked ...
3
votes
0
answers
85
views
Force order in Plotly Treemap
I'm creating a treemap using plotly express. In timepoints I have three options: Time 1, Time 2 and Time 3. However I have less data in Time 2 than Time 3 (I have less visits and thus less instrument ...
3
votes
1
answer
116
views
How to avoid unintended "jaggedness" in 3D Plotly plots?
I’m using Plotly to plot a 3D dataset and the best-fit line to that dataset (Plotly version 6.2.0, Mac OS Monterey). When I plot the data in its original coordinates, the dataset and best-fit line ...
1
vote
0
answers
66
views
Reduce file size of multiple ggplotly graphs
I'm creating a document with a lot of ggplotly objects. This returns in a big file size. Apparently we could use the partial_bundle function to reduce the file size of plotly object. Unfortunately ...
2
votes
1
answer
85
views
How to specify a color for missing data in R plotly heatmaps using colorscale
I have a series of heatmaps I'm displaying using plotly in R. Some of those heatmaps have cells with missing data, and I'd like those cells to show up grey, with the rest of the cells colored with a ...