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

Method _icon

lib/matplotlib/backends/backend_qt.py:853–865  ·  view source on GitHub ↗

Construct a `.QIcon` from an image file *name*, including the extension and relative to Matplotlib's "images" data directory. Uses _IconEngine for automatic DPI scaling.

(self, name)

Source from the content-addressed store, hash-verified

851 NavigationToolbar2.__init__(self, canvas)
852
853 def _icon(self, name):
854 """
855 Construct a `.QIcon` from an image file *name*, including the extension
856 and relative to Matplotlib's "images" data directory.
857
858 Uses _IconEngine for automatic DPI scaling.
859 """
860 # Get the image path
861 path_regular = cbook._get_data_path('images', name)
862
863 # Create icon using our custom engine for automatic DPI handling
864 engine = _IconEngine(path_regular, self)
865 return QtGui.QIcon(engine)
866
867
868 def edit_parameters(self):

Callers 2

__init__Method · 0.95
add_toolitemMethod · 0.45

Calls 1

_IconEngineClass · 0.85

Tested by

no test coverage detected