Fix matplotlib warning

Harmonise matplotlib backend
This commit is contained in:
lastpoet 2010-10-04 20:39:34 +01:00
parent d69a2c4df4
commit 21b6108345
3 changed files with 7 additions and 3 deletions

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

2
pyfpdb/GuiSessionViewer.py Executable file → Normal file
View File

@ -30,7 +30,7 @@ try:
calluse = not 'matplotlib' in sys.modules calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
if calluse: if calluse:
matplotlib.use('GTK') matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar