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. Use [r-plotly] for the R package and [plotly-python] for the Python package.

You can use Plotly to import and analyze data, create beautiful, interactive, browser-based graphs, and then collaborate on your graphs with others. Plotly also has a Python sandbox (NumPy supported), and has APIs for Python, R, MATLAB, Arduino, Julia, Perl, and REST.

You can see more in the gallery.

enter image description here

Resources

13887 questions
4
votes
2 answers

Hover text for plot_geo function in plotly

I want to display the county name(subregion) and the population value(pop_cat) in hover. Here's what i tried, library(tidyverse) library(plotly) df <-…
4
votes
1 answer

Plotly Dash - Add annotation to scatter plot for a point when it is clicked-on

I have a scatter plot in dash, with some on-click callbacks. I would like to display the annotation for a point when I click on it. The annotation should remain visible for any point that has been clicked. Does anyone know if this is possible;…
user3431083
  • 404
  • 5
  • 19
4
votes
0 answers

Clickable graph nodes with NetworkX and Plotly

Currently I am developing a program that finds semantic links between international news and represents news with links as a graph. What I need is to make the nodes of this graph clickable, that means, when clicking on a node user should be…
Valeria S.
  • 338
  • 4
  • 19
4
votes
1 answer

Plotly arrow from origin to certain point

Is it possible to create arrows in plotly? I'm trying to plot directions, and the workaround I did was just to plot a straight line, which is just not the same as an arrow. Basically, I have a data frame and want to create, for every set of points…
4
votes
1 answer

Does plotly offline offer the same as online version?

I am considering moving from matplotlib to plotly. plotly seems great and all, but most of the documentation assumes that the user uses online API, not offline one. So, any example with the line import plotly.plotly as py needs to be converted to…
Hojin Cho
  • 384
  • 2
  • 12
4
votes
0 answers

Show specific plane (XY) in plotly 3D Scatterplot in R

With showgrid = TRUE for x-axis and y-axis, is there any way to get rid of the VERTICAL lines extending from the x and y-axis so that there is a single plane showing? library(plotly) itemName = c("Alpha", "Bravo", "Charley", "Delta", "Echo",…
craab
  • 105
  • 5
4
votes
1 answer

Plotly: How to format numeric yaxis and hover text?

I have a python plotly graph with numeric yaxis, it automatically formats the yaxis numbers to 'k' scale and and when hovering the point, shows values like `115.277258k. How can I change the scale to display 100,000 instead of 100k and also format…
BRS
  • 41
  • 1
  • 3
4
votes
2 answers

Controlling the shared legend when adding a ggplot dendrogram plot to a plotly heatmap

I have genes x samples expression data I'd like to generate a plotly heatmap for and add the samples dendrogram ggplot to. Here are my data: set.seed(1) mat <- matrix(rnorm(100*10),100,10,dimnames = list(paste0("G",1:100),paste0("S",1:10))) Here's…
dan
  • 6,048
  • 10
  • 57
  • 125
4
votes
2 answers

How To Combine Chart And Table Into One Plotly Image

I have successfully created a plotly bar chart image with the following snippet of code: chart = go.Figure(data=chart_matrix) And have successfully created a second plotly table image with the following snippet of code: trace_table = go.Table( …
John Smith
  • 415
  • 1
  • 6
  • 11
4
votes
1 answer

Plotly stacked surfaces sharing same colorbar

I would like to plot 3 stacked surfaces sharing the same colorbar and colorscale. I would like the colorbar to have 11 ticks in [0.0, 0.1, ..., 0.9, 1.0]. For some reason I can't seem to get plotly to use the same colorbar and scale for all the…
ClonedOne
  • 569
  • 4
  • 20
4
votes
2 answers

Plotly R order scatter plot legend entries

I create a plot in the following manner: ## generate test data getTestData <- function(seed_val=711, noise=1.0) { set.seed(seed_val) d <- seq(as.Date('2017/01/01'), as.Date('2017/01/08'), "days") first_name <- rep("Jane", 8) …
Michael Szczepaniak
  • 1,970
  • 26
  • 35
4
votes
1 answer

Make plot and trace same color by factor plotly R

I have a scatter plot with 3 factors. I add 3 traces where each trace corresponds to a factor. I want the scatter plot and the trace to be the same color. Here is simple function to generate appropriate test data: ## generate test…
Michael Szczepaniak
  • 1,970
  • 26
  • 35
4
votes
1 answer

Change all text color in Plotly R

I'm writing an R shiny app on a black background and need to change all plotly text to white. For some reason my code is not working: output$plotly_bar<- renderPlotly({ plot_ly(FAID_mexico, x = ~Funding_Agency_Acronym, y =…
adarvishian
  • 175
  • 1
  • 3
  • 11
4
votes
1 answer

Python Plotly timezone incorrectly set in x-axis candlestick

When I am using the plotly with datetime, it shows the wrong time, e.g. 8/12/2017 10:00am, but the plotly's plot show is 8/12/2017 2:00am instead. I want to plot the candlestick with the datetime as the x-axis, and the datetime is initialized as…
4
votes
1 answer

plotly vs seaborn: violin plot in python

I tried to plot violin plot in plotly and observed that plotly scales the data according to the width and not to area of each category. This scale parameter can be controlled in a seaborn library, but not in plotly. Is there a way to scale the…
kkk
  • 183
  • 1
  • 9
1 2 3
99
100