Skip to content

Commit

Permalink
Fix compatibility with matplotlib 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago Baptista committed Apr 13, 2018
1 parent 30fac4c commit 880ee12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,5 @@ ENV/
.spyderproject

# Rope project settings
.ropeproject
.ropeproject
.idea
10 changes: 3 additions & 7 deletions simcx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015-2017 Tiago Baptista
# Copyright (c) 2015-2018 Tiago Baptista
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,6 @@
import matplotlib.pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib import animation
from matplotlib import verbose
import pyglet
import os

Expand Down Expand Up @@ -316,18 +315,15 @@ def grab_frame(self, **savefig_kwargs):
The keyword arguments are not being used in the subclass.
"""

verbose.report('MovieWriter.grab_frame: Grabbing frame.',
level='debug')
try:
image = pyglet.image.get_buffer_manager().get_color_buffer().get_image_data()
self._frame_sink().write(image.get_data('RGBA',
-4 * self.display.width))

except RuntimeError:
out, err = self._proc.communicate()
verbose.report('MovieWriter -- Error '
'running proc:\n%s\n%s' % (out,
err), level='helpful')
print('MovieWriter -- Error ')
print('running proc:\n%s\n%s' % (out, err))
raise


Expand Down
4 changes: 2 additions & 2 deletions simcx/__version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -----------------------------------------------------------------------------
# Copyright (c) 2015-2016 Tiago Baptista
# Copyright (c) 2015-2018 Tiago Baptista
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,4 +14,4 @@
# limitations under the License.
# -----------------------------------------------------------------------------

__version__ = '1.0.0-beta.21'
__version__ = '1.0.0-beta.22'

0 comments on commit 880ee12

Please sign in to comment.