Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3428e8 commit a7b574cCopy full SHA for a7b574c
2 files changed
CHANGELOG
@@ -1,6 +1,9 @@
1
New entries should be added at the top
2
3
==============================================================
4
+2004-11-04 Changed -dbackend processing to only use known backends, so
5
+ we don't clobber other non-matplotlib uses of -d, like -debug.
6
+
7
2004-11-04 backend_agg.py: added IMAGE_FORMAT to list the formats that the
8
backend can save to.
9
backend_gtkagg.py: added support for saving JPG files by using the
lib/matplotlib/__init__.py
@@ -756,15 +756,22 @@ def rcdefaults():
756
# Allow command line access to the backend with -d (matlab compatible
757
# flag)
758
759
+_knownBackends = {
760
+ 'PS':1, 'GTK':1, 'Template':1, 'GD':1,
761
+ 'WX':1, 'Paint':1, 'Agg':1, 'GTKAgg':1, 'SVG':1,
762
+ 'TkAgg':1, 'WXAgg':1, 'FltkAgg':1, 'Cairo':1, 'GTKCairo':1,}
763
764
if hasattr(sys,'argv'): # mod_python doesn't have argv attr
765
+ known = _knownBackends.keys()
766
for s in sys.argv[1:]:
767
if s.startswith('-d'): # look for a -d flag
- rcParams['backend'] = s[2:].strip()
- break
768
+ name = s[2:].strip()
769
+ # we don't want to assume all -d flags are backends, eg -debug
770
+ if name in known:
771
+ rcParams['backend'] = name
772
+ break
773
774
-_knownBackends = {'PS':1, 'GTK':1, 'Template':1, 'GD':1,
- 'WX':1, 'Paint':1, 'Agg':1, 'GTKAgg':1, 'SVG':1,
- 'TkAgg':1, 'WXAgg':1, 'FltkAgg':1, 'Cairo':1, 'GTKCairo':1,}
775
776
def use(arg):
777
"""
0 commit comments