Skip to content

Fix Mplot3d warning formatting #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 8 additions & 8 deletions viz/mplot_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def drawer_refresh(self, queue, lock):

def on_key_press(self, event):
print(mp.current_process().name,f' - Mplot2d \"{self.title}\": key event pressed... {event.key}')
self.key.value = ord(event.key) # conver to int
self.key.value = ord(event.key) # convert to int
self.key_queue_thread.put(self.key.value)

def on_key_release(self, event):
Expand Down Expand Up @@ -337,13 +337,13 @@ def __init__(self, title=''):
self.process.start()

def quit(self):
print(f'Mplot3d \"{self.title}\" closing...')
print(f'Mplot3d {self.title} closing...')
self.is_running.value = 0
self.process.join(timeout=5)
self.process.join(timeout=5)
if self.process.is_alive():
print("Warning: Mplot3d \"{self.title}\" process did not terminate in time, forced kill.")
self.process.terminate()

print(f'Warning: Mplot3d {self.title} process did not terminate in time, forced kill.')
self.process.terminate()
print(f'Mplot3d {self.title} closed')

def init(self, figure_num, lock):
lock.acquire()
Expand Down Expand Up @@ -399,7 +399,7 @@ def drawer_refresh(self, queue, lock):

def on_key_press(self, event):
print(mp.current_process().name,f" - Mplot3d \"{self.title}\": key event pressed...", event.key)
self.key.value = ord(event.key) # conver to int
self.key.value = ord(event.key) # convert to int
self.key_queue_thread.put(self.key.value)

def on_key_release(self, event):
Expand Down Expand Up @@ -496,4 +496,4 @@ def plot_refresh(self, lock):
#if not kUseFigCanvasDrawIdle:
if kUsePlotPause:
plt.pause(kPlotSleep)
lock.release()
lock.release()