Skip to content

Commit

Permalink
Make it easier to override values
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 20, 2016
1 parent 63dfee5 commit 27e3204
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metakernel/magics/plot_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def line_plot(self, *args, **kwargs):
width, height = kwargs['size']
kwargs['width'] = int(width)
kwargs['height'] = int(height)
# Remove empty options so ".setdefault" will work.
for key in ['resolution', 'format', 'size', 'width', 'height']:
if kwargs[key] is None:
del kwargs[key]
self.kernel.plot_settings = kwargs
self.kernel.handle_plot_settings()

Expand Down

0 comments on commit 27e3204

Please sign in to comment.