X Tutup
Skip to content

How to apply ax.margins to current axes limits? #7391

@qAp

Description

@qAp

Is there a way to use ax.margins to adjust the axes limits, after the axes limits have already been adjusted using ax.set_ylim? It appears that ax.margins has effect only if ax.set_ylim has not been used.

This notebook
http://nbviewer.jupyter.org/github/qap/offline_radiation_notebooks/blob/lblnew/longwave/lblnew_20160916/study__g1_threshold/n2o/band07_wn_1215_1380/P_50_T_250/4.e-21/matplotlib_axmargins.ipynb

describes a situation in which this need may arise.

Note: the y-axis is just an example, the same also applies to the x-axis (ax.set_xlim).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup