plotly

How to create a heatmap animation with plotly express?

时间秒杀一切 提交于 2020-07-18 06:59:10
问题 I have a list of square matrices, M[t], where t ranges from 0 to N and I wish to create an animated heatplot using plotly.express. The entries in each row/column correspond to a list, a=['a1','a2',...'aN'] The plotly documentation on animation is fairly sparse and focuses on just scatterplots and barplots https://plotly.com/python/animations/ A question similar to mine was posted at How to animate a heatmap in Plotly However, the user is working in a Jupyter notebook. I'm simply using Python

How can I change the size of my Dash Graph?

白昼怎懂夜的黑 提交于 2020-07-15 05:12:07
问题 I'm running into layout difficulties with the plots on Dash. All the plots I generate with Dash seem to be auto sized to be very narrow, which makes it hard to actually view the data without some creative zooming. As an example, when I view the source on one of my dashes, it looks like it computes the height of the main plot container (svg-container) to be 450px and the height of the graph itself to be 270px (looking at the subplots). It would be nice if I could make the graph, say, 700px. My

How can I change the size of my Dash Graph?

纵然是瞬间 提交于 2020-07-15 05:10:59
问题 I'm running into layout difficulties with the plots on Dash. All the plots I generate with Dash seem to be auto sized to be very narrow, which makes it hard to actually view the data without some creative zooming. As an example, when I view the source on one of my dashes, it looks like it computes the height of the main plot container (svg-container) to be 450px and the height of the graph itself to be 270px (looking at the subplots). It would be nice if I could make the graph, say, 700px. My

How to automate running of Jupyter Notebook cells periodically

廉价感情. 提交于 2020-07-09 16:46:13
问题 I want to integrate my jupyter notebook with my website, where I have written the code to fetch real-time data from MySQL server and do real-time visualisation using plotly . But every time I'm having to run all the cells of my Kernel. Is there a way I can automate the running of the Jupyter notebook cells periodically say everyday 1 hour? 回答1: My suggestion would be to Setup a cron job with the periodicity you want. Use runipy to run all the cells in the notebook. It has a lot of

Is it possible to export dash datatable to a specific location on disk or directly to SQL Server?

大城市里の小女人 提交于 2020-07-09 05:26:24
问题 I created a tool in Dash where user pulls data from SQL Server, filters out desired rows and edits values in one of the columns. Now I have to get that filtered and edited table in a new table in SQL Server. I'm new to dash and can't find a way to export directly to SQL Server or export .csv to a specific location on disc and handle it with a SQL Server procedure from there. Has anyone had a problem like this and knows if it is even possible? I managed to export .csv , but it goes into the

Second yaxis plotly does not apply

老子叫甜甜 提交于 2020-07-09 02:27:07
问题 Hey I am using the package plotly to create diagrams and i am trying to set up 2 different yaxis, but it does not work. Here is my code: Schuldenquote_Argentinien <- c(80.3,70.8,62.1,53.8,55.4,43.5,38.9,40.4,43.5,44.7,52.6,53.1,57.1) Schuldenquote_Brasilien <- c(68.7,65.9,63.8,61.9,65,63.1,61.2,62.2,60.2,62.3,72.6,78.3,84.1) Schuldenquote_Chile <- c(7,5,3.9,4.9,5.8,8.6,11.1,11.9,12.7,15,17.3,21,23.5) Schuldenquote_Mexico <- c(38.5,37.4,37.2,42.5,43.7,42,42.9,42.7,45.9,48.9,52.8,56.8,54)

Multiple plotly plots on 1 page without subplot

你离开我真会死。 提交于 2020-07-08 12:04:41
问题 I want to have multiple plotly plots on 1 html page without using the tools.make_subplots method. (I dont want to use that since I find that its not easy to read and I want a unique legend & layout in each of the subplot panels). I want to define 2 figures with their own unique layouts, and arrange them arbitrarily on the page. I think I know how to do this with dash using the html.Div object, but I was wondering if there was an easy way to do this using only plotly? 回答1: I encountered the

plotly.express choropleth only showing some information from geojson

只谈情不闲聊 提交于 2020-07-08 00:44:55
问题 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 is reading the geojson but not displaying properly. My df looks as such: NUTS level nuts318cd ... 2016.0 2017 5 NUTS3 UKC11 ... 4457.0 4569.0 6 NUTS3 UKC12 ... 4092.0 4137.0 7 NUTS3 UKC13 ... 1692.0 1697.0 8 NUTS3 UKC14 ... 7913.0 8088.0 10 NUTS3 UKC21 ... 5872.0 6015.0 .. ... ... ... ... ... 230

How to fix PlotlyRequestError?

爷,独闯天下 提交于 2020-07-06 08:54:50
问题 I get an 'PlotlyRequestError: No message' when I execute the code. import plotly import plotly.plotly as py import plotly.graph_objs as go Filedata = pd.read_csv('C:\\Documents\\Book4.csv') data = [go.Scatter(x=Filedata.ix[:,0],y=Filedata.ix[:,1])] layout = go.Layout( title='Analysis 2016', xaxis=dict(title='Startdate'), yaxis=dict(title='Conductivity')) fig = go.Figure(data=data, layout=layout) py.iplot(fig) 回答1: This is because you are trying to plot online which requires credentials based

Plotly: How to plot a cumulative “steps” histogram?

你离开我真会死。 提交于 2020-07-05 12:33:48
问题 I am trying to plot a cumulative histogram using Plotly in python, but make it look like "steps", i.e. bars with no color and only the top line is displayed. Something like this: Basically, I'm trying to reproduce the behavior of the following matplotlib code: import matplotlib.pyplot as plt plt.hist(x, cumulative=True, histtype='step') So far, the best I've been able to do is: import plotly.graph_objs as go from plotly.offline import iplot h = go.Histogram(x=x, cumulative=dict(enabled=True),