plotly

Plotly: How to only show vertical and horizontal line (crosshair) as hoverinfo?

吃可爱长大的小学妹 提交于 2020-06-22 22:46:48
问题 I want to plot a chart with two subplots in plotly dash. My entire chart looks like this: import pandas as pd import numpy as np import dash import dash_core_components as dcc import dash_html_components as html import plotly.graph_objs as go from plotly.subplots import make_subplots df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv').iloc[:60] fig = make_subplots(rows=2, cols=1, row_heights=[0.8, 0.2], vertical_spacing=0) fig.add_trace(go

How to plot multiple 3d lines with plotly express?

最后都变了- 提交于 2020-06-17 14:48:09
问题 I would like to have more than just one 3d line in my graph to be able to compare the data unfortunately this .add_ methods are not present for all kinds of plots. fig = px.line_3d(sample, x='Time', y='y' ,z='intensity') # fig.add_line_3d(sample2, x='Time', y='y' ,z='intensity') fig Can I extract the traces from a figure and then plot them all together somehow? 回答1: With Plotly Express, you can create multiple lines with a single call, so long as your data is in a "tidy" format. You can use

similar to seaborn's hue function in plotly?

风格不统一 提交于 2020-06-17 01:53:43
问题 geo1 = go.Scatter( x=geo['Year'], y=geo['Number'], mode='lines', marker=dict(color=geo['Geographical region'],size=4, showscale=False), name='geo', showlegend=True) data = [geo1] layout = dict( title='Working VISA in UK by Regions', xaxis=dict(title='Year'), yaxis=dict(title='Number'), showlegend=True) fig = dict(data=data, layout=layout) iplot(fig) The result shows: what I want is to use a similar function as 'hue' in seaborn: how to do the plotly coding by regions in different colors? 回答1:

Python plotly_Connection markers with labels within line

百般思念 提交于 2020-06-13 06:00:08
问题 This bounty has ended . Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 17 hours . Dmitry wants to draw more attention to this question: I tried to make annotations within this method fig.update_layout( showlegend=False, annotations=[ dict( x=122.58333, y=45.36667, xref="x", yref="y", text="15", showarrow=True, arrowhead=7, ax=0, ay=-40 ) ] ) But here is problem with coordinate system. So I'm stuck here. In the code below I have marker labels.

What is difference between plot and iplot in Pandas?

时光毁灭记忆、已成空白 提交于 2020-06-11 04:10:29
问题 What is the difference between plot() and iplot() in displaying a figure in Jupyter Notebook? 回答1: I just started using iplot() in Python (3.6.6). I think it uses the Cufflinks wrapper over plotly that runs Matplotlib under the hood. It is seems to be the easiest way for me to get interactive plots with simple one line code. Although it needs some libraries to setup. For example, the code below works in Jupyter Notebook (5.0.0) on macOS. The plots attached here are PNG and therefore not

What is difference between plot and iplot in Pandas?

戏子无情 提交于 2020-06-11 04:09:25
问题 What is the difference between plot() and iplot() in displaying a figure in Jupyter Notebook? 回答1: I just started using iplot() in Python (3.6.6). I think it uses the Cufflinks wrapper over plotly that runs Matplotlib under the hood. It is seems to be the easiest way for me to get interactive plots with simple one line code. Although it needs some libraries to setup. For example, the code below works in Jupyter Notebook (5.0.0) on macOS. The plots attached here are PNG and therefore not

Plotly: How to remove empty dates from x axis?

泪湿孤枕 提交于 2020-06-09 05:09:50
问题 I have a Dataframe Date Category Sum 0 2019-06-03 "25M" 34 1 2019-06-03 "25M" 60 2 2019-06-03 "50M" 23 3 2019-06-04 "25M" 67 4 2019-06-05 "50M" -90 5 2019-06-05 "50M" 100 6 2019-06-06 "100M" 6 7 2019-06-07 "25M" -100 8 2019-06-08 "100M" 67 9 2019-06-09 "25M" 450 10 2019-06-10 "50M" 600 11 2019-06-11 "25M" -9 12 2019-07-12 "50M" 45 13 2019-07-13 "50M" 67 14 2019-07-14 "100M" 130 15 2019-07-14 "50M" 45 16 2019-07-15 "100M" 100 17 2019-07-16 "25M" -90 18 2019-07-17 "25M" 700 19 2019-07-18 "25M"

Plotly: How to remove empty dates from x axis?

こ雲淡風輕ζ 提交于 2020-06-09 05:09:27
问题 I have a Dataframe Date Category Sum 0 2019-06-03 "25M" 34 1 2019-06-03 "25M" 60 2 2019-06-03 "50M" 23 3 2019-06-04 "25M" 67 4 2019-06-05 "50M" -90 5 2019-06-05 "50M" 100 6 2019-06-06 "100M" 6 7 2019-06-07 "25M" -100 8 2019-06-08 "100M" 67 9 2019-06-09 "25M" 450 10 2019-06-10 "50M" 600 11 2019-06-11 "25M" -9 12 2019-07-12 "50M" 45 13 2019-07-13 "50M" 67 14 2019-07-14 "100M" 130 15 2019-07-14 "50M" 45 16 2019-07-15 "100M" 100 17 2019-07-16 "25M" -90 18 2019-07-17 "25M" 700 19 2019-07-18 "25M"

Plotly: How to remove empty dates from x axis?

戏子无情 提交于 2020-06-09 05:08:51
问题 I have a Dataframe Date Category Sum 0 2019-06-03 "25M" 34 1 2019-06-03 "25M" 60 2 2019-06-03 "50M" 23 3 2019-06-04 "25M" 67 4 2019-06-05 "50M" -90 5 2019-06-05 "50M" 100 6 2019-06-06 "100M" 6 7 2019-06-07 "25M" -100 8 2019-06-08 "100M" 67 9 2019-06-09 "25M" 450 10 2019-06-10 "50M" 600 11 2019-06-11 "25M" -9 12 2019-07-12 "50M" 45 13 2019-07-13 "50M" 67 14 2019-07-14 "100M" 130 15 2019-07-14 "50M" 45 16 2019-07-15 "100M" 100 17 2019-07-16 "25M" -90 18 2019-07-17 "25M" 700 19 2019-07-18 "25M"

RMarkdown and ggplotly

北慕城南 提交于 2020-05-30 03:52:06
问题 I am wishing to create an interactive figure to send to a co-worker, who does not have nor use R. The figure that I am creating contains confidential data. I am a beginner at using ggplotly and understand interactive figures can be posted online, however, I don't wish for this figure to be publicly available. I have been using the offline plotting version. I understand interactive reports, including plotly figures, can be compiled using R Markdown. However, if I run this plot in R and create