Questions tagged [r-plotly]

plotly is an R package to create interactive web-based visualizations via 'plotly.js'.

plotly is a plotting package for R used to create interactive data visualizations. For examples and documentation, visit the plotly website here.

Repository

Stable Version on Cran

1205 questions
0
votes
1 answer

Merging plotly objects R

I have two scatterplots and I want to show that the regression lines are different. In one case, I am considering all the data for 1995-2017. I want to show, that the average is higher for odd years (95,97) than in general. The data frame for all…
Johnny Banana
  • 123
  • 1
  • 9
0
votes
1 answer

Having two symmetric bar charts plotly

I use plotly library in R. I want to have two symmetric bar charts. Something like that: But I have : plot_ly(x= customer_age_sex$POP,y=customer_age_sex$AGE,color=customer_age_sex$CIVILITE) %>% add_bars(orientation = 'h') How can I change the…
JackR
  • 165
  • 12
0
votes
1 answer

candlestick chart (plotly) R

I have an issue with candlestick chart from plotly. On my test data work fine but if i use my data frame result is: library(plotly) df %>% plot_ly(x = date, type="candlestick", open = open, close = close, high = max, low = min)…
Mandy
  • 129
  • 2
  • 10
0
votes
1 answer

Traces not coming up properly when working on dual axis charts with plotly R

I have written below snippet of code to plot dual-axis charts using plotly in R. Code: ## Date creation dtMasterWithtotals <- data.table("Period_Month" = c('7/1/2017', '9/1/2017'), A = c(171, 448), B = c(0, 655), C = c(476, 812)) ## Vectors to…
Rohit Saluja
  • 1,517
  • 2
  • 17
  • 25
0
votes
1 answer

Custom hover effects for each point in plotly boxplot with markers in R

The following link - https://plot.ly/r/box-plots/#basic-boxplot - leads to the main tutorial that plotly offers for boxplots in R, and the specific plot type that I am interested in working with is the following: p <- plot_ly(y = ~rnorm(50), type =…
Canovice
  • 9,012
  • 22
  • 93
  • 211
0
votes
1 answer

Set marker size based on coordinate values, not pixels, in plotly R

This post - Set marker size in plotly - unfortunately did not help with what I was looking for, and is the only post on the topic I could find. Per the plotly documentation on the size parameter for scatter plots: "size (number or array of numbers…
Canovice
  • 9,012
  • 22
  • 93
  • 211
-1
votes
2 answers

Color aeras between two times series

I would like to know how to color the area between two time series. I have created a graph with the following code: annee = c("2018-05-01", "2018-04-30", "2018-04-29", "2018-04-28" ,"2018-04-27", "2018-04-26", "2018-04-25", "2018-04-24",…
-1
votes
1 answer

using ls() pattern to create list of plots for subplot

I am running a loop that assigns a plot to a variable. the code then pulls the variable names with the ls() pattern function while (i > 0) { assign(paste("fig", i, sep = ""), plot_ly(tot, y = ~gene, color = ~bx, type = "box", boxpoints = "all") %>%…
Ahk86
  • 177
  • 2
  • 11
-1
votes
1 answer

Obtaining and modifying the box select info from a Plotly map in shiny

I am trying to create an interactive shiny app that shows the user a Plotly map and allows the user to select different counties in the U.S. Then it can use the info on the selected counties to generate graphs and plots. However, it seems that the…
Kaihua Hou
  • 89
  • 1
  • 9
-1
votes
2 answers

requiring a a fixed horizontal line on a times series plot

i have a plotly plot based on a time series but now im required to add a fixed horizontal like at y=238 to it can you please give me some ideas? fig= plot_ly( data = x, x = x$time, y = x$infected, mode = 'lines' ) fig
Andres Mora
  • 1,040
  • 8
  • 16
-1
votes
1 answer

When plotly bar chart textposition = "inside", how do I shift the text inside the bar?

Code: library(plotly) library(dplyr) xValues <- c("drug1","drug2","drug3","drug4","drug5") yValues <- c(5,10,15,20,25) bar <- plot_ly(x = yValues, y = xValues, type = 'bar', orientation = 'h', …
SRL
  • 145
  • 9
-1
votes
1 answer

Why can't the date correctly be displayed on the X-axis?

Code library(shiny) library(ggplot2) library(reshape2) library(plotly) data <- read.csv("https://covid.ourworldindata.org/data/full_data.csv") data$date <- as.Date(data$date, format = "%Y-%m-%d") class(data$date) data$location <-…
-1
votes
2 answers

Waterfall graph

sample data Country State City Currency Tasks Accidents IND KR BLR INR 1000 500 IND WB CCU INR 2500 200 SL SL COL SLR 500 400 JAP JAP TOK YEN 400…
-1
votes
1 answer

Boxplot next to a scatterplot in R with plotly

I created a scatter plot with plotly in R. Now I want to plot a boxplot with different data next to the scatter plot. I want to use plotly for this. The result should look like this. Can someone help me please, I have no idea how to do that. My…
Jensxy
  • 119
  • 1
  • 14
-1
votes
1 answer

Login to Plotly from R

Can I log into Plotly from R? By putting in my credentials as follows py <- plotly("myusername", "blah") to open the connection, my graphs do not show up unless I go to the Plotly website and log in as well. I want a way to log into Plotly directly…
maia
  • 3,910
  • 4
  • 27
  • 34
1 2 3
80
81