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

Method on_message

lib/matplotlib/backends/backend_nbagg.py:225–238  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

223 self.comm.send({'data': data_uri})
224
225 def on_message(self, message):
226 # The 'supports_binary' message is relevant to the
227 # websocket itself. The other messages get passed along
228 # to matplotlib as-is.
229
230 # Every message has a "type" and a "figure_id".
231 message = json.loads(message['content']['data'])
232 if message['type'] == 'closing':
233 self.on_close()
234 self.manager.clearup_closed()
235 elif message['type'] == 'supports_binary':
236 self.supports_binary = message['value']
237 else:
238 self.manager.handle_json(message)
239
240
241@_Backend.export

Callers

nothing calls this directly

Calls 3

on_closeMethod · 0.95
clearup_closedMethod · 0.80
handle_jsonMethod · 0.80

Tested by

no test coverage detected