You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return the string representing the configuration dir.
342
-
343
-
default is HOME/.matplotlib. you can override this with the
344
-
MPLCONFIGDIR environment variable
345
-
"""
346
-
347
-
configdir=os.environ.get('MPLCONFIGDIR')
348
-
ifconfigdirisnotNone:
349
-
ifnot_is_writable_dir(configdir):
350
-
raiseRuntimeError('Could not write to MPLCONFIGDIR="%s"'%configdir)
351
-
returnconfigdir
352
-
353
-
h=get_home()
354
-
p=os.path.join(get_home(), '.matplotlib')
355
-
356
-
ifos.path.exists(p):
357
-
ifnot_is_writable_dir(p):
358
-
raiseRuntimeError("'%s' is not a writable dir; you must set %s/.matplotlib to be a writable dir. You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored "%h)
359
-
else:
360
-
ifnot_is_writable_dir(h):
361
-
raiseRuntimeError("Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data"%h)
Return the string representing the configuration dir.
859
+
860
+
default is HOME/.matplotlib. you can override this with the
861
+
MPLCONFIGDIR environment variable
862
+
"""
863
+
864
+
configdir=os.environ.get('MPLCONFIGDIR')
865
+
ifconfigdirisnotNone:
866
+
ifnot_is_writable_dir(configdir):
867
+
raiseRuntimeError('Could not write to MPLCONFIGDIR="%s"'%configdir)
868
+
returnconfigdir
869
+
870
+
h=get_home()
871
+
p=os.path.join(get_home(), '.matplotlib')
872
+
873
+
ifos.path.exists(p):
874
+
ifnot_is_writable_dir(p):
875
+
raiseRuntimeError("'%s' is not a writable dir; you must set %s/.matplotlib to be a writable dir. You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored "%h)
876
+
else:
877
+
ifnot_is_writable_dir(h):
878
+
raiseRuntimeError("Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data"%h)
0 commit comments