Commit 78764ab7 authored by Philipp Gast's avatar Philipp Gast
Browse files

warning introduced for overwriting default values in getState()

parent 5549873a
Pipeline #431 failed with stage
in 3 minutes and 15 seconds
......@@ -127,6 +127,7 @@ class MyFig_client(Figure):
Warning: myplotlib allows in a transparent manner to modify the axes directly. Those changes can not be covert.
"""
state = dict()
# test for double keywords and print a waring
for ax in self.axes:
......@@ -143,8 +144,14 @@ class MyFig_client(Figure):
if mask in axKeywords :
axKeywords[masks[mask]] = axKeywords.pop(mask)
# Test if kewords are already set by an other axes
for key in axKeywords.keys() :
if key in state.keys():
print('Warning: The keyword \"',key,'\" appears in multiple axes. The Defaults will be overwritten. Prevent this by using aliases')
# update the global keyword index
state.update(axKeywords)
return state
def reSyncFig(self):
......@@ -271,7 +278,13 @@ class MyFig_client(Figure):
#if the name is correct we should never get here.
print(SEVR + "The axes name ", name, " was not found")
return None
def getAxesName(self,unknownax) :
""" compares all axes against the function parameter and returns the name of that axes if found in figure"""
for ax in self.get_axes() :
if unknownax == ax :
return ax.name
# FORMAT RAW DATA --------------------------------------------------
def formatRawData(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment