Flat subheadings in Python-Borders, Sync Panning, Sidelabels

The next graph is my attempt to use Plotly in Python (the code at the bottom) to make a 2x2 graph. enter image description here

I am trying to improve the schedule, but I can not do the following:

  • Borders on each of the subheadings.
  • Synchronize pan and zoom of all graphs. Although I use shared_xaxes and shared_yaxes, it only works for the row and column heading. Therefore, if I exchange on the lower left chart, the upper right chart remains uniform.
  • Side marks for subtitles. See, for example,enter image description here

Any help would be greatly appreciated. Below is my code.

import plotly.offline as poff
import plotly.tools as tls

x = list(range(10,20))
y = x
y1 = [10-i for i in x]
y2 = [abs(i-5) for i in x]
y3 = [abs(2*i- 5) for i in x]

fig = tls.make_subplots(rows=2, cols=2, shared_xaxes=True, shared_yaxes=True,
                        vertical_spacing=0.01,
                        horizontal_spacing=0.01, print_grid=True)
fig.append_trace(go.Scatter({'x':x, 'y':y, 'name':'A1'},), 1, 1)
fig.append_trace(go.Scatter({'x':x, 'y':y1, 'name':'B2'},), 2, 2)
fig.append_trace(go.Scatter({'x':x, 'y':y2, 'name':'A2'},), 2, 1)
fig.append_trace(go.Scatter({'x':x, 'y':y3, 'name':'B1'},), 1, 2)

fig['layout'].update(title='Multiple Subplots')
url = poff.plot(fig, filename="test23.html")
+4
source share

All Articles