plotly

How to customize hover information in ggplotly object?

六眼飞鱼酱① 提交于 2021-02-07 05:09:20
问题 Is there a way to customize hoverinfo in a ggplotly object? For example, p <- ggplot(mtcars, aes(x = disp, y= am, color = as.factor(cyl)))+geom_point() ggplotly(p) The hover information box here contains three variables:disp,am and factor(cyl). How to include more variables or exclude existing variables in the hover information box? Thanks! 回答1: You can include required variables in aes() then use tooltip to specify which should be displayed: p <- ggplot(mtcars, aes(x = disp, y= am, color =

How to customize hover information in ggplotly object?

纵饮孤独 提交于 2021-02-07 05:08:41
问题 Is there a way to customize hoverinfo in a ggplotly object? For example, p <- ggplot(mtcars, aes(x = disp, y= am, color = as.factor(cyl)))+geom_point() ggplotly(p) The hover information box here contains three variables:disp,am and factor(cyl). How to include more variables or exclude existing variables in the hover information box? Thanks! 回答1: You can include required variables in aes() then use tooltip to specify which should be displayed: p <- ggplot(mtcars, aes(x = disp, y= am, color =

Remove “Edit Chart” link from Plotly plot (Python)

假如想象 提交于 2021-02-07 04:20:15
问题 I'm using Python to plot some graphics with the Plotly framework. I would like to remove the Edit Chart link at the bottom-right. I tried different solutions, like py.iplot(fig, filename=filename, show_link=False) or adding the &link=false string at the end of the URL while embedding the plot in an HTML page, but the link is still there. 来源: https://stackoverflow.com/questions/42957873/remove-edit-chart-link-from-plotly-plot-python

Return datapoints selected in a plotly scatterplot

依然范特西╮ 提交于 2021-02-07 04:12:07
问题 I created a plotly scatterplot from a ggplot2 using ggplotly . I would like to obtain a table of the datapoints selected / zoomed into, but I can't find a way to do this. library(ggplot2) library(plotly) p <- ggplotly(plot.rel.kinship) htmlwidgets::saveWidget(as_widget(p), "scatterplot.html") There seems to be a similar unanswered question on the plotly forum: https://community.plot.ly/t/get-datapoints-in-currently-zoomed-view/259 This question also seems to be related: Using Plotly with DT

Return datapoints selected in a plotly scatterplot

家住魔仙堡 提交于 2021-02-07 04:07:59
问题 I created a plotly scatterplot from a ggplot2 using ggplotly . I would like to obtain a table of the datapoints selected / zoomed into, but I can't find a way to do this. library(ggplot2) library(plotly) p <- ggplotly(plot.rel.kinship) htmlwidgets::saveWidget(as_widget(p), "scatterplot.html") There seems to be a similar unanswered question on the plotly forum: https://community.plot.ly/t/get-datapoints-in-currently-zoomed-view/259 This question also seems to be related: Using Plotly with DT

Return datapoints selected in a plotly scatterplot

帅比萌擦擦* 提交于 2021-02-07 04:07:52
问题 I created a plotly scatterplot from a ggplot2 using ggplotly . I would like to obtain a table of the datapoints selected / zoomed into, but I can't find a way to do this. library(ggplot2) library(plotly) p <- ggplotly(plot.rel.kinship) htmlwidgets::saveWidget(as_widget(p), "scatterplot.html") There seems to be a similar unanswered question on the plotly forum: https://community.plot.ly/t/get-datapoints-in-currently-zoomed-view/259 This question also seems to be related: Using Plotly with DT

How can I embed plotly graphs into powerpoints or apple's keynote?

℡╲_俬逩灬. 提交于 2021-02-06 09:03:27
问题 I am learning how to generate graphs with plotly. I am biochemistry graduate student. I would like to use these graphs into presentations (e.g. powerpoint, keynote). I was wondering if someone could please give me a general strategy or link to a tutorial. Thank you! 回答1: Plotly has an MS Office App that allows embedding in Powerpoint on Windows computers: https://store.office.com/plotly-charts-WA104379485.aspx?assetid=WA104379485 Keynote does not allow iframes, so Plotly graphs can't be

Stick Plot for wind speed and direction data in ggplot

只谈情不闲聊 提交于 2021-02-05 11:30:58
问题 I'd like to plot a stick plot for wind speed/ direction data similar to this: https://www.researchgate.net/figure/Stick-plot-of-mean-daily-wind-speed-and-direction-measured-at-Valentia-Island-from_fig5_226577448 I've found a good plot in the excelent oce package, but I'd like to make this same kind of plot using ggplot (or plotley). WindSpeed<-c(1,2,3,5,7,2,3,4,5,6,7,8) WindDir<-c(180,90,320,200,350,10,270,50,9,100,110,129) TimeStamp<-c("2018-01-02 01:00","2018-01-02 02:00","2018-01-02 03:00"

Stick Plot for wind speed and direction data in ggplot

偶尔善良 提交于 2021-02-05 11:30:22
问题 I'd like to plot a stick plot for wind speed/ direction data similar to this: https://www.researchgate.net/figure/Stick-plot-of-mean-daily-wind-speed-and-direction-measured-at-Valentia-Island-from_fig5_226577448 I've found a good plot in the excelent oce package, but I'd like to make this same kind of plot using ggplot (or plotley). WindSpeed<-c(1,2,3,5,7,2,3,4,5,6,7,8) WindDir<-c(180,90,320,200,350,10,270,50,9,100,110,129) TimeStamp<-c("2018-01-02 01:00","2018-01-02 02:00","2018-01-02 03:00"

Plotting graphs lines based on column values from the same datafram using Plotly

半腔热情 提交于 2021-02-05 10:54:06
问题 I am trying to plot a line graph of different types of cars sold per day in ** plotly ** on ** R **. The way the graph would look is that, it would have line graphs of each type of car that was sold on each day. So lets say I have the dataframe called ** df1 ** id date Value Honda 10/30/12 2 Honda 10/31/12 3 Honda 11/1/12 3 Merc 11/2/12 4 Merc 10/30/12 1 Merc 10/31/12 2 Toyota 11/1/12 3 Toyota 11/3/12 2 Now I want three lines(one line for each type of car) on the same x axis. I tried using