Skip to content

Commit

Permalink
Updated json communication to change NaNs to nulls. Fixes #1189 (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb authored Jan 10, 2019
1 parent e295bcf commit 6780021
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/GenerateJob/templates/backend_deepforge.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
FigureCanvasBase, FigureManagerBase, GraphicsContextBase, RendererBase)
from matplotlib.figure import Figure

import json
import simplejson as json

class RendererTemplate(RendererBase):
"""
Expand Down Expand Up @@ -187,7 +187,7 @@ def show(block=None):
interactive versus batch mode
"""
for manager in Gcf.get_all_fig_managers():
# do something to display the GUI
manager.canvas.send_deepforge_update()
pass


Expand Down Expand Up @@ -246,7 +246,7 @@ def send_deepforge_update(self):
state = self.figure_to_state()
# Probably should do some diff-ing if the state hasn't changed...
# TODO
print('deepforge-cmd PLOT ' + json.dumps(state))
print('deepforge-cmd PLOT ' + json.dumps(state, ignore_nan=True))

def figure_to_state(self):
figure = self.figure
Expand Down

0 comments on commit 6780021

Please sign in to comment.