MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _set_dpi

Method _set_dpi

lib/matplotlib/figure.py:2868–2883  ·  view source on GitHub ↗

Parameters ---------- dpi : float forward : bool Passed on to `~.Figure.set_size_inches`

(self, dpi, forward=True)

Source from the content-addressed store, hash-verified

2866 return self._dpi
2867
2868 def _set_dpi(self, dpi, forward=True):
2869 """
2870 Parameters
2871 ----------
2872 dpi : float
2873
2874 forward : bool
2875 Passed on to `~.Figure.set_size_inches`
2876 """
2877 if dpi == self._dpi:
2878 # We don't want to cause undue events in backends.
2879 return
2880 self._dpi = dpi
2881 self.dpi_scale_trans.clear().scale(dpi)
2882 w, h = self.get_size_inches()
2883 self.set_size_inches(w, h, forward=forward)
2884
2885 dpi = property(_get_dpi, _set_dpi, doc="The resolution in dots per inch.")
2886

Callers 1

Calls 4

get_size_inchesMethod · 0.95
set_size_inchesMethod · 0.95
scaleMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected