e30d055aca6da86ef147f6772b7b53a82b645b9e,tutorials/intermediate/constrainedlayout_guide.py,,,#,81

Before Change


// However, this will steal space from a subplot layout:

fig, axs = plt.subplots(2, 2, constrained_layout=True)
for ax in axs.flatten()[:-1]:
    ax.plot(np.arange(10))
axs[1, 1].plot(np.arange(10), label="This is a plot")
axs[1, 1].legend(loc="center left", bbox_to_anchor=(0.8, 0.5))

After Change


leg.set_in_layout(True)
// we don"t want the layout to change at this point.
fig.set_constrained_layout(False)
fig.savefig("CL01.png", bbox_inches="tight", dpi=100)

//////////////////////////////////////////////////////////////////////////////////////////
// The saved file looks like:
//
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: matplotlib/matplotlib
Commit Name: e30d055aca6da86ef147f6772b7b53a82b645b9e
Time: 2018-10-05
Author: 23121882+ImportanceOfBeingErnest@users.noreply.github.com
File Name: tutorials/intermediate/constrainedlayout_guide.py
Class Name:
Method Name:


Project Name: ultralytics/yolov3
Commit Name: c0cacc45a14083dc14cbfef65088a6e6b19aec88
Time: 2019-03-30
Author: glenn.jocher@ultralytics.com
File Name: utils/utils.py
Class Name:
Method Name: plot_results


Project Name: matplotlib/matplotlib
Commit Name: f2e2aa02df60786f53f080cf58bf11698b67fc6c
Time: 2017-05-30
Author: dstansby@gmail.com
File Name: examples/text_labels_and_annotations/tex_demo.py
Class Name:
Method Name:


Project Name: nilmtk/nilmtk
Commit Name: 6621f0b9511e252a10c190f773c5686535d998de
Time: 2014-01-14
Author: nipunreddevil@gmail.com
File Name: scripts/plots_for_e_energy_2014/wm_comparison_table.py
Class Name:
Method Name: