plotly-python

plotly treemap element with “href” not working with local relative html paths

我是研究僧i 提交于 2020-08-25 04:02:14
问题 I have simple table with href inside the text. The href points to relative path of local html file. But clicking on it doesn't open the page. is there any way to do that/ good workaround? The folder structure is following. As the root will be changed, so the relative path is needed. --root --root/index.html --root/files/file1.html --root/files/file2.html import plotly.express as px df = px.data.gapminder().query("year == 2007") link_ref = '<a href="files/file1.html">{}</a>' df['country'] = df

Plotly: how to make an unbounded vertical line in a subplot?

我的梦境 提交于 2020-08-24 10:29:11
问题 The goal is to get vertical infinite lines in every subplot, at x=1. In this example, I'll just try a single plotly shape of type="line" in the first row, first column from plotly.subplots import make_subplots import plotly.graph_objects as go import numpy as np fig = make_subplots( rows=2, cols=2, subplot_titles=list(map(str, range(4))), shared_xaxes=True, shared_yaxes=False, ) time = np.linspace(-np.pi, np.pi, 1000) for i in range(4): data = np.sin((i+1) * time) fig.add_trace( go.Scatter(y