Questions tagged [plotly]
Plotly.js 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. For the Plotly R package, please use tag [r-plotly].
6,238
questions
0
votes
0answers
15 views
plotly and counter python cant get result
To get destination port result from the pcap to the plotly, I can't get any result to plotly chart, but if I do print (dport) can list the dport result, anything wrong on my python?
from scapy.all ...
1
vote
0answers
11 views
Python Plotly: Adding a horizontal line to a scatter plot that has multiple subplots
I have a scatter plot that is running on Plotly dash. This is the code:
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly
import plotly.graph_objs as go
...
-1
votes
0answers
16 views
Box Plot y axis log scale [error in layout]
I am trying to draw box plot using below code adding y axis log scale but facing errors while executing the program.
I would like to adjust The y axis labels with Proper decimal places.
I would also ...
0
votes
0answers
11 views
plotly dash python, search a text with button, with many duplicates, in the column, of table
in plotly dash python, I have a table and want to search a text, with many duplicates, in the column, search criteria limited to the column of a table. but the result is the entire table with a ...
0
votes
1answer
24 views
express plotly - TypeError: unsupported operand type(s) for /: 'str' and 'int'
I'm trying to plot data frame with percentage columns throw express plotly.
receiving
TypeError: unsupported operand type(s) for /: 'str' and 'int'
the columns:
Meeting_inv pchanges_dax ...
0
votes
0answers
8 views
Heatmaply: Setting labels for axes in ggheatmap
I'm trying to use the heatmaply function ggheatmap instead of heatmaply_cor so that I can add my output to a ggplot2 plot. However, I'm having trouble getting x-axis and y-axis labels to show up.
I'...
-1
votes
0answers
9 views
Heatmaply: Setting color for labels
I'm making a heatmap using heatmaply. I'm specifically using the ggheatmap function within the heatmaply package (much of the code is the same as the general heatmaply_cor function). I've run into ...
0
votes
0answers
31 views
How to make contour plot in R with a ribbon overlay to show the seafloor
I have data of the temperature at different sea depths for a series of sampling stations (factors).
<table><tbody><tr><th>Station_No</th><th>Temperature</...
1
vote
2answers
29 views
Plotly: How to display individual value on histogram?
I am trying to make dynamic plots with plotly. I want to plot a count of data that have been aggregated (using groupby).
I want to facet the plot by color (and maybe even by column). The problem is ...
1
vote
0answers
14 views
Is there plotly option to use custom axes scale?
I would like to use a custom axes scale in Plotly (for use in Python) other than the linear and log scales available.
An example of this in matplotlib is here: https://matplotlib.org/3.1.0/gallery/...
2
votes
0answers
15 views
Update_layout argument list with Plotly
I am learning to use Plotly and in every single example the layout is updated with fig.update_layout(...
https://plotly.com/python/text-and-annotations/
And I would like to know exactly everything ...
1
vote
1answer
23 views
Is there any good way to represent the order change before and after sorting on a value in a data frame?
I have a Pandas data-frame and I will be sorting it on a particular column. If I want to plot the data to represent how the data is changing before and after sorting, is there any good way?
Before ...
-4
votes
0answers
31 views
Seaborn function in plotly [closed]
I have the following dataset:
A=[f,f,w,f,w,f,w,w,w,f]
B=[0,0,1,0,1,0,0,0,1,1]
In seaborn I plot them as in the figure below:
How can I do this in Plotly?
0
votes
0answers
17 views
plotly - changing year to date in x-axis leads to graph going out of page
I am trying to create an animated graph of monthly temperature data from 1901-2017.
This is my program.
import plotly.graph_objects as go
import pandas as pd
df=pd.read_csv("Mean_Temp_IMD_2017.csv")...
0
votes
0answers
16 views
plotly.express choropleth only showing some information from geojson
I am trying to create a choropleth map using plotly.express When the figure loads it only shows one color (bottom of the color scale) and shows the outline of a singular region. This clearly means it ...
1
vote
1answer
27 views
Add a title for each chart created by a loop in knitr
If you run the following to create an HTML document, you see that it creates a separate bar chart for the three iris species.
In order to print this list of plotly charts in an HTML document that ...
0
votes
0answers
15 views
Plotly select range with given end date in timeseries plot
In plotly I would like to create a button that selects a given range.
I can do this:
var rawDataURL = 'https://raw.githubusercontent.com/plotly/datasets/master/2016-weather-data-seattle.csv';
var ...
1
vote
1answer
24 views
Python plotly - Remove equal values from the map
Within piece of code below I have label on each separate region of the map. What is the way to remove equal labels and leave only unique ones with centration of this unique label in the middle of it's ...
1
vote
0answers
26 views
Strange results with GeoJSON in plotly
I tried to plot some values with plotly and highcharts GeoJSON data from this repo, but I got very strange result.
Code example:
# packages -----------------------------------------------------------...
2
votes
3answers
27 views
Display logos on Plot.ly Bar figure
I am currently doing a dataviz project, and I wish to add small images above each bar of my bar chart. For some reason, when I upload my own .png files, they can not be displayed.
When I use the ....
0
votes
0answers
20 views
Draw Draggable Point with vertical lines on X and Y axis [closed]
I have a graph created in JS with plotly. I want to draw Circle connected with two lines coming out of that circle, one horizontal, one vertical. Circle has to be draggable. With circle drag, also ...
0
votes
0answers
19 views
How to implement a Vertical line following mouse cursor in python plotly [duplicate]
Is it possible to draw vertical line on graphs which follows the mouse or which can be controlled by method calls? The motivation is that if you have multiple variables plotted on the y-axis you may ...
0
votes
0answers
11 views
Issue using modeBarButtonsToAdd
I'm using plotly dash for Python and trying to add a custom button to the modebar of a graph in order to download the source data for the graph. The error I get is 'must provide button 'click' ...
0
votes
0answers
17 views
R Plotly -Stacked Barchart with total amount of bars text
Problem: I have a stacked barchart. Above each of the stacked bars I want to have a total number (i.e. the sum of the two bars - here: total). I tried to take usage of add_text but it did not work out ...
1
vote
0answers
21 views
In R using Knitr, how can I get plotly charts created in a loop to print? [duplicate]
I'm trying to create an HTML document using Knitr. I noticed you can get it to print regular plots created in a loop without any problem. However, plotly charts aren't as simple. For example, how can ...
2
votes
1answer
27 views
Add error bars to points within a plotly box plot
I'm creating a R plotly boxplot for these data:
set.seed(1)
df <- data.frame(value = rnorm(100),
value.error. = runif(100,0.01,0.1),
treatment = rep(LETTERS[1:10]...
0
votes
0answers
13 views
Active table change by plotly heatmap on R shiny
I am using plotly heatmap on R shiny.
app.R
library(shiny)
library(plotly)
shinyApp(
ui = fluidPage(
plotlyOutput("plotly_heat"),
tableOutput("table_heat")
),
server = function(input,...
0
votes
0answers
15 views
Add paths only to some frames in animated R plotly
I've got an animated scatterplot in which I'd like to connect some points with a path using add_paths. Everything works fine if the data that contains coordinates of the path exists for all animation ...
0
votes
0answers
26 views
Separate colour mappings in R plotly
I've got two layers of markers for which I'd like to use separate colour mappings. The problem is that the second add_marker inherits the palette from the first one. Is there anything like ggnewscale::...
1
vote
1answer
22 views
Plotly: How to customize labels in a scattergeo plot?
In the code below I have marker labels which now is located close to these markers. What is the way to make customise destination between marker and it's label? I want to put labels a little bit far ...
0
votes
0answers
15 views
Plotly Add Annotation to Gantt Chart
I am creating a gantt chart based on a pandas dataframe (df) in plotly. I have a column in my dataframe named 'Label' that I'd like to add on top of the bar in my gantt chart, but I can't figure out ...
-1
votes
0answers
11 views
Python plotly_Annotations
In the code below I have marker labels. What is the way to make these labels far from markers and add annotation line from marker center to it's label text?
import plotly.express as px
import plotly....
0
votes
0answers
16 views
Using a dropdown menu in dash to select inputs
I'm just getting to grips with dash and trying to recreate some graphs I made with plotly.
I have a master.csv stored in a dataframe with info for many countries. I want to use a dropdown to select ...
0
votes
0answers
8 views
Plotly JS - live data chart
I am currently working on a project to present data on a web page that is retrieved from a device. I have managed to get a template based on random numbers being fed just to see if i can get this to ...
-1
votes
1answer
20 views
Python plotly_change marker's color
I want to customise marker colors and for yhis reason I made SetColor function. But it change only names in legend, but not colors in the visualization. How to fix it?
import plotly.express as px
...
0
votes
1answer
15 views
How to get the months in plotly express in line chart in order
How to get the months in order in line chart in plotly express. here is the data set
and code
import plotly.graph_objs as go
fig = go.FigureWidget()
df_long=pd.melt(final_line_data, id_vars=['Month']...
0
votes
0answers
8 views
Python plotly scatter_geo_Text isolation within legend
There is possibility to isolate trace in legend, but it isolate only markers and not the text on them. How to isolate text as well?
import plotly.express as px
import plotly.graph_objs as go
import ...
0
votes
0answers
15 views
update data of altair chart when notebook is executed with voila
I want to execute a specific cell when a button is pressed to update the data present in the plot using voila.
import altair as alt
import pandas as pd
import ipywidgets as widgets
import functools
...
-1
votes
1answer
23 views
How can we color the plotly bar by some condition in plotly python?
I want to color my Bar "Red" when below zero and "light green" when above zero in plotly python.
0
votes
0answers
47 views
Blank chorpleth map with Plotly express
I am trying to build a choropleth map in Plotly of Regions in England by 'NUTS code' from data supplied by the government at: https://data.gov.uk/dataset/f884db1c-38a1-4fa1-9d0e-3c4a0d80e2da/nuts-...
0
votes
0answers
15 views
Plotly R event zoom in and zoom out
I m trying to create dynamic plots in plotly R. The idea is that I have a bar plot with plotly.. Each bar is calculated behind the hood by a bunch of variables.. Typically a linear combination of them....
0
votes
0answers
11 views
Plotly heatmap restyle is causing lag. Trying to basically stream data in, the data is 256x1024
data = {
z: [data],
hoverinfo: "skip",
};
Plotly.restyle("test", data, [0]);
Im basically doing that with data being a 256x1024 array of integer values. The result is taking about a ...
1
vote
2answers
61 views
Python plotly scatter_geo modify hover data
I want to modify hover data and leave ther for e.g. only bins data.
I made following code, but hover_data parameter didn't work. What is the way to modify haver data?
import plotly.express as px
...
-1
votes
0answers
21 views
I would like to display on the same plotly scatter type marker several add_markers
I look for delete the topside of the legend on this plot :
plotly type scatter with multiple add_markers
and my code as below :
fig <- plot_ly(partitions,
x = ~`_Dim.1`, y = ~`_Dim.2`, name = "...
2
votes
2answers
31 views
How to display ggplotly plots with dynamically created tabs and for-loops?
I have R markdown document and I want to dynamically create tabs with ggplotly graphics inside them
---
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
...
0
votes
1answer
22 views
Plotly with ShinyApp?
Edit: Solved.
I am not sure what the problem was, but I guess it is about Rstudio.
When I uploaded the app to https://shinyapps.io/ , it works!
I am trying to render a plotly object with a shinyapp,
...
1
vote
1answer
28 views
Plotly: How to update figure with multiple dependent traces using updatemenus?
I am updating a scatter plot using updatemenus that take as arguments the fields I want to update:
dict(label = category,
method = 'update',
args = [dict(x=[df[(df['cat_name'] == category)...
0
votes
0answers
18 views
Add callback to commands created in other callback
I am trying to create an short dash frame in which you can select in a selection box for which data you want to select ranges. As the amount of checkboxes is variable this is done whit a callback on ...
1
vote
1answer
26 views
Plotly: How to remove empty dates from x axis?
I have a Dataframe
Date Category Sum
0 2019-06-03 "25M" 34
1 2019-06-03 "25M" 60
2 2019-06-03 "50M" 23
3 2019-06-04 "25M" 67
4 2019-06-05 "50M" ...
0
votes
0answers
11 views
Dash Cytoscape callbacks not working after refresh in a Flask app
I'm currently working with a dash app inside a flask server. This is the current app code simplified:
server = Flask(__name__, template_folder="../frontend/templates")
external_stylesheets = ['https:...