Skip to content

Commit

Permalink
Small changes from latest matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
ebranlard committed Jun 5, 2021
1 parent ae6bd75 commit f9d8d8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion installer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ packages=weio

exclude=weio/.git*
weio/tests
pkgs/weio/tests
pkgs/weio/examples
pkgs/weio/weio/tests
pkgs/numpy/core/include
pkgs/numpy/doc
pkgs/numpy/f2py
Expand Down
18 changes: 14 additions & 4 deletions pydatview/GUIPlotPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import dateutil # required by matplotlib
#from matplotlib import pyplot as plt
import matplotlib
matplotlib.use('Agg') # Important for Windows version of installer
matplotlib.use('wxAgg') # Important for Windows version of installer. NOTE: changed from Agg to wxAgg
from matplotlib import rc as matplotlib_rc
try:
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
Expand Down Expand Up @@ -951,12 +951,22 @@ def plot_all(self, keep_limits=True):

# Log Axes
if self.cbLogX.IsChecked():
ax_left.set_xscale("log", nonposx='clip')
try:
ax_left.set_xscale("log", nonpositive='clip') # latest
except:
ax_left.set_xscale("log", nonposx='clip') # legacy

if self.cbLogY.IsChecked():
if bAllNegLeft is False:
ax_left.set_yscale("log", nonposy='clip')
try:
ax_left.set_yscale("log", nonpositive='clip') # latest
except:
ax_left.set_yscale("log", nonposy='clip')
if bAllNegRight is False and ax_right is not None:
ax_right.set_yscale("log", nonposy='clip')
try:
ax_right.set_yscale("log", nonpositive='clip') # latest
except:
ax_left.set_yscale("log", nonposy='clip') # legacy

# XLIM - TODO FFT ONLY NASTY
if self.pltTypePanel.cbFFT.GetValue():
Expand Down

0 comments on commit f9d8d8f

Please sign in to comment.