Remove space between subtitles in Plotly?

I have a lot of space between my plot plans. Matplotlib has a layout called a hard layout that removes this. Is there a similar layout in the plot? I draw on an iPython laptop, so there is limited space. See Space in the image below.

enter image description here

+5
source share
1 answer

Yes there is! You can use specs and vertical_spacing or horizontal_spacing . Here is an example for horizontal_spacing :

 from plotly import tools import plotly.plotly as py from plotly.graph_objs import * trace1 = Scatter( x=[1, 2, 3], y=[4, 5, 6] ) trace2 = Scatter( x=[20, 30, 40], y=[50, 60, 70], ) fig = tools.make_subplots(rows = 1, cols = 2, specs = [[{}, {}]], horizontal_spacing = 0.05) fig.append_trace(trace1, 1, 1) fig.append_trace(trace2, 1, 2) py.iplot(fig, filename='make-subplot-horizontal_spacing') 

here is the plot

You can find additional guides on the Plotly subplots page: Subtitle Tutorial

+15
source

All Articles