Parameters ---------- dpi : float forward : bool Passed on to `~.Figure.set_size_inches`
(self, dpi, forward=True)
| 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 |
no test coverage detected