plotly

how can I see plotly graphs in pycharm?

感情迁移 提交于 2019-12-08 04:58:56
问题 I see the following renderers are available: Default renderer: 'browser' Available renderers: ['plotly_mimetype', 'jupyterlab', 'nteract', 'vscode', 'notebook', 'notebook_connected', 'kaggle', 'azure', 'colab', 'json', 'png', 'jpeg', 'jpg', 'svg', 'pdf', 'browser', 'firefox', 'chrome', 'chromium', 'iframe', 'iframe_connected', 'sphinx_gallery'] but I don't see how I can get pycharm to show the output, in the IDE, like when I do graphs with matplotlib. how can this be done? Edit: this is the

Is there a way to merge/embed multiple Plotly HTML files into one page/HTML file offline?

一个人想着一个人 提交于 2019-12-08 04:34:36
问题 I'm trying to combine multiple charts into one HTML report to send out. The thing is I don't really think subplotting is the best idea because the charts are relatively unrelated (different X/Y axes). All I need to do is just append the charts into 1 HTML file. There is a guide that explains how to do it using plotly URLs, but I don't want to rely on an internet connection for automated reporting, and I want to be able to view these reports online I'm trying to create an HTML report that

Make plot out of multiple plot.ly figures in Python

帅比萌擦擦* 提交于 2019-12-08 04:00:38
问题 I've made 4 figures in plot.ly, for example: import plotly.plotly as py import plotly.graph_objs as go trace1 = go.Scatter( x=[0, 1, 2, 3, 4, 5, 6, 7, 8], y=[8, 7, 6, 5, 4, 3, 2, 1, 0] ) trace2 = go.Scatter( x=[0, 1, 2, 3, 4, 5, 6, 7, 8], y=[0, 1, 2, 3, 4, 5, 6, 7, 8] ) data = [trace1, trace2] fig1 = go.Figure(data=data, layout=layout) fig2 = go.Figure(data=data, layout=layout) fig3 = go.Figure(data=data, layout=layout) fig4 = go.Figure(data=data, layout=layout) Now I want to make a subplot,

Interactive Choropleth in R of Sweden

好久不见. 提交于 2019-12-08 03:42:28
I'm trying to develop an interactive choropleth in a Shiny application in R. I've tried with plotly, gVis and rCharts, but still without any luck. I need to visualise it for Sweden right now, but I probably need it for other countries as well later on. This is what I have so far for gvisGeoMap: polygons <- readOGR("/ggshape", layer="SWE_adm1") polygons <- fortify(polygons, region="ID_1") data.poly <- as.data.frame(polygons) data.poly <- data.poly[,c(1,2)] data.poly.final <- data.frame(locationvar = paste(data.poly[,2],data.poly[,1], sep = ":"), numvar=1, hovervar="test") data.poly.final

Is there a way to embed html code inside tooltips in plotly with R?

情到浓时终转凉″ 提交于 2019-12-08 03:24:09
问题 I want to embed html code inside the plotly's on hover tooltip. Here is a working example: plotly::plot_ly( type = "pie", labels = "A", hovertext = '<i>text in italics</i>', # Renders text in italics hoverinfo = "text" ) This reprex seems to work perfectly fine, by rendering the text in italics. However, more complex html code seems to fail to be rendered as html, and is instead rendered as plain text. In my case, what I want is to embed an image inside the tooltip, like the following: plotly

plotly not creating linear trend line

♀尐吖头ヾ 提交于 2019-12-08 03:02:37
问题 In creating a trend line for a scatter plot, I am using add_trace to add a linear trend line. When the data only has one "series" of data, i.e. there is only one group of coordinates, the code below works fine. However, when I introduce a number of series, the "trend line" looks like this: Here is the relevant part of the code: p <- plot_ly(filteredFull(), x=Relative.Time.Progress, y=cumul.ans.keystroke, mode='markers', color=KeystrokeRate, size=KeystrokeRate, marker=list(sizeref=100), type=

Using ipywidgets with plotly in jupyter notebook

流过昼夜 提交于 2019-12-08 01:44:35
问题 I want to use the offline plotting of plotly inside a jupyter notebook and want to manipulate or redraw the plot by using widgets from ipywidgets. Unfortunately I do not manage to update the plots appropiately: from ipywidgets import widgets, HBox, Output import plotly as py from plotly.offline import iplot from IPython.display import display %matplotlib inline ip_widget = widgets.FloatSlider( value=6, min=3, max=10, step=1, description='num', continuous_update = True ) ow = Output() def

Setting ranges for a bar chart in R and displaying count of items

陌路散爱 提交于 2019-12-08 01:20:33
问题 I have created a data frame from iris dataset using the following command: new_iris = data.frame(iris$Species,iris$Sepal.Length) range(iris$Sepal.Length) The second command tells me the range of the Sepal.Length. I want to implement a bar plot using plotly or ggplot2 such that the code decides the ranges of Sepal.Length automatically and then each range contains one bar which gives the count of all the Sepal.Length values in that range. So let's say if the ranges decided are "2-4","4-6","6-8"

Disable hover information for a specific layer (geom) of plotly

落花浮王杯 提交于 2019-12-08 01:18:16
问题 library(ggplot2) library(plotly) gg <- ggplot(mtcars, aes(factor(vs), drat)) + geom_violin() + geom_jitter() ggplotly(gg) In example code we use ggplot to plot violin and jitter layers. Plotly displays information for both layers (i.e. when hovered over jitter point it will display specific point information, same thing happens when hovered over the violin plot). However, I want plotly to display information only for geom_jitter . Question: How to disable hovered information for specific

Python Plotly - Multiple dropdown plots, each of which have subplots

柔情痞子 提交于 2019-12-08 00:39:00
问题 Problem I'm trying to combine two Python Plotly features. One of them is a drop down menu where a user can switch between plots (link to examples). The other feature is subplots. My attempt I have working code that uses the dropdown menu, but it doesn't have subplots. So I looked up how to create subplots here and I thought I could treat a tools.make_subplots figure the same way I treated a go.Box figure. I'm sorry if this seems naive, I'm actually fairly new to Plotly. However, this attempt