Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions galleries/examples/user_interfaces/embedding_webagg_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def create_figure():
will use to communicate to the server. This websocket object can
also be a "fake" websocket that underneath multiplexes messages
from multiple figures, if necessary. */
var websocket_type = mpl.get_websocket_type();
var websocket = new websocket_type("%(ws_uri)sws");
var websocket = new WebSocket("/ws");

// mpl.figure creates a new figure on the webpage.
var fig = new mpl.figure(
Expand Down Expand Up @@ -122,9 +121,7 @@ class MainPage(tornado.web.RequestHandler):

def get(self):
manager = self.application.manager
ws_uri = f"ws://{self.request.host}/"
content = html_content % {
"ws_uri": ws_uri, "fig_id": manager.num}
content = html_content % {"fig_id": manager.num}
self.write(content)

class MplJs(tornado.web.RequestHandler):
Expand Down
Loading