Commit 5059a1e2 authored by eric pellegrini's avatar eric pellegrini

Merge branch 'bugfix-matplotlib_back_compatibility' into 'develop'

Fix bug due to matplotlib backcompatibility

See merge request !27
parents c117286e 774db938
Pipeline #4234 passed with stages
in 28 minutes and 48 seconds
version 1.2.0
--------------
* ADDED issue #10 Implemented Gromacs trajectory converter
* FIXED issue #20 Opening the theoretical help on MacOS is now OK
* FIXED issue #25 The plotter is now compliant with all matplotlib versions (was crashing on ubuntu-xenial)
* FIXED issue #21 "Save a template for new analysis" button produced an error
* FIXED issue #20 Opening the theoretical help on MacOS is now OK
* CHANGED (internal) MDANSE is now built with system python (2.7.10)
version 1.1.3
--------------
* FIXED issue #17 The plotter crashed when user was clicking on "plot in new window"
* FIXED issue #19 Users could not display user definitions
* FIXED issue #17 The plotter crashed when user was clicking on "plot in new window"
version 1.1.2
--------------
......@@ -21,8 +22,8 @@ version 1.1.1
version 1.1.0
--------------
* ADDED issue #11 MDANSE is now compliant with 16.04 and 18.04 Ubuntu systems
* ADDED issue #12 MDANSE has now three different development phases (beta, rc, release)
* ADDED issue #11 MDANSE is now compliant with 16.04 and 18.04 Ubuntu systems
* CHANGED Replacing all "output_file" occurences by "output_files" /!\ Modifies API /!\
* FIXED issue #13 The changelog was not updated in the windows installer
* FIXED issue #9 updated the macos build scripts in order to have an universal dmg
......
......@@ -30,10 +30,12 @@ Created on Apr 10, 2015
:author: Gael Goret, Bachir Aoun, Eric C. Pellegrini
'''
from distutils.version import LooseVersion
import os
import numpy
import matplotlib
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg, NavigationToolbar2WxAgg
from matplotlib.figure import Figure
from matplotlib.colors import LogNorm, Normalize
......@@ -64,7 +66,11 @@ class Plotter1D(wx.Panel):
### Initialize variables ###
self.parent = parent
self.figure = Figure(figsize=(5,4), dpi=None)
self.axes = self.figure.add_axes( (10,10,10,10), frameon=True, facecolor='b')
if LooseVersion(matplotlib.__version__) < LooseVersion("2.0.0"):
self.axes = self.figure.add_axes( (10,10,10,10), frameon=True, axis_bgcolor='b')
else:
self.axes = self.figure.add_axes( (10,10,10,10), frameon=True, facecolor='b')
self.canvas = FigureCanvasWxAgg( self, wx.ID_ANY, self.figure )
self.toolbar = NavigationToolbar2WxAgg(self.canvas)
self.plots = {}
......@@ -530,4 +536,4 @@ class Plotter1D(wx.Panel):
d = LinesSettingsDialog(self)
d.SetFocus()
d.ShowModal()
d.Destroy()
\ No newline at end of file
d.Destroy()
......@@ -31,9 +31,11 @@ Created on Apr 10, 2015
'''
import collections
from distutils.version import LooseVersion
import numpy
import matplotlib
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg, NavigationToolbar2WxAgg
from matplotlib.figure import Figure
from matplotlib.colors import LogNorm, Normalize
......@@ -76,7 +78,10 @@ class Plotter2D(wx.Panel):
### Initialize variables ###
self.parent = parent
self.figure = Figure(figsize=(5,4), dpi=None)
self.axes = self.figure.add_axes( (10,10,10,10), frameon=True, facecolor='b')
if LooseVersion(matplotlib.__version__) < LooseVersion("2.0.0"):
self.axes = self.figure.add_axes( (10,10,10,10), frameon=True, axis_bgcolor='b')
else:
self.axes = self.figure.add_axes( (10,10,10,10), frameon=True, facecolor='b')
self.canvas = FigureCanvasWxAgg( self, wx.ID_ANY, self.figure )
self.toolbar = NavigationToolbar2WxAgg(self.canvas)
self.ax = None
......@@ -580,4 +585,4 @@ class Plotter2D(wx.Panel):
d = ImageSettingsDialog(self)
d.SetFocus()
d.ShowModal()
d.Destroy()
\ No newline at end of file
d.Destroy()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment