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
This is a backwards-compatible update. There is NO API break. Two new features:
- multiple key/value sets can be set in a single call by using keyword arguments
- "overwrite" kwarg can be used to overwrite previously-set keys OR to leave the
previous ones without barfing
# Already have old key, so can't add a new key. Or have multiple new
2798
-
# values.
2799
-
raiseGnuplotlibError("Options dict given multiple values for key '{}'".format(key_normalized))
2832
+
iflen(values) >1:
2833
+
raiseGnuplotlibError("plot options given multiple values for key '{}'".format(key_normalized))
2834
+
ifkeyindorkey_normalizedind:
2835
+
# A value already exists. What do I do?
2836
+
if (overwriteisnotNone) andoverwrite:
2837
+
pass
2838
+
elif (overwriteisnotNone) andnotoverwrite:
2839
+
return
2840
+
else:
2841
+
# overwrite is None (the default). Barf.
2842
+
raiseGnuplotlibError("plot options already have a value for key '{}'. Pass 'overwrite=False' to use the existing one of 'overwrite=True' to use the new one".format(key_normalized))
0 commit comments