Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress matplotlib deprecation warning in nested multicontrollers #358

Merged
merged 1 commit into from
Sep 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions mumot/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
symbols,
)
from sympy.parsing.latex import parse_latex
from warnings import warn
from warnings import warn, catch_warnings, simplefilter

from . import (
consts,
Expand Down Expand Up @@ -544,11 +544,13 @@ def _plot(self, _=None) -> None:
else:
# subplotNum = 1
for func, subPlotNum, axes3d in self._controller._replotFunctions:
if axes3d:
# self._figure.add_subplot(self._numRows, self._numColumns, subPlotNum, projection = '3d')
plt.subplot(self._numRows, self._numColumns, subPlotNum, projection='3d')
else:
plt.subplot(self._numRows, self._numColumns, subPlotNum)
with catch_warnings():
simplefilter("ignore")
if axes3d:
# self._figure.add_subplot(self._numRows, self._numColumns, subPlotNum, projection = '3d')
plt.subplot(self._numRows, self._numColumns, subPlotNum, projection='3d')
else:
plt.subplot(self._numRows, self._numColumns, subPlotNum)
func()
plt.subplots_adjust(left=0.12, bottom=0.25, right=0.98, top=0.9, wspace=0.45, hspace=None)
# plt.tight_layout()
Expand Down