Remove INTERESTING_VALUES_OF_AXES
usage
This commit is contained in:
parent
a9861a761f
commit
2bfedf54ad
@ -31,11 +31,13 @@ for axis in Axis:
|
||||
axisProfile = PROFILES_OF_AXES[axis]
|
||||
colorsOfAxes[axis] = plt.plot(axisProfile, label = axis)[0].get_color()
|
||||
|
||||
'''
|
||||
for axis in Axis:
|
||||
for interestingValueOfAxisIndex, interestingValueOfAxis in enumerate(INTERESTING_VALUES_OF_AXES[axis]):
|
||||
linestyle = ':' if interestingValueOfAxisIndex % 2 == 0 else '--'
|
||||
label = f'{axis} local {"minimum" if interestingValueOfAxisIndex == 0 else "maximum"}' if interestingValueOfAxisIndex <= 1 else None
|
||||
plt.axvline(interestingValueOfAxis, color = colorsOfAxes[axis], alpha = 0.3, linestyle = linestyle, label = label)
|
||||
'''
|
||||
|
||||
def flattenDictValues(dict_):
|
||||
return itertools.chain(*dict_.values())
|
||||
@ -43,6 +45,7 @@ def flattenDictValues(dict_):
|
||||
# TODO: How to avoid hardcoding the default color being `black`?
|
||||
MATPLOTLIB_DEFAULT_COLOR = 'black'
|
||||
|
||||
'''
|
||||
allInterestingValuesOfAxes = list(set(flattenDictValues(INTERESTING_VALUES_OF_AXES)))
|
||||
ticks = list(plt.xticks()[0]) + allInterestingValuesOfAxes
|
||||
plt.xticks(ticks)
|
||||
@ -62,6 +65,7 @@ allInterestingIntensitiesOfAxes = list(flattenDictValues(INTERESTING_PROFILES_OF
|
||||
allInterestingIntensitiesOfAxesMin = min(allInterestingIntensitiesOfAxes)
|
||||
allInterestingIntensitiesOfAxesMax = max(allInterestingIntensitiesOfAxes)
|
||||
plt.ylim(allInterestingIntensitiesOfAxesMin, allInterestingIntensitiesOfAxesMax)
|
||||
'''
|
||||
|
||||
plt.legend()
|
||||
plt.show()
|
Loading…
x
Reference in New Issue
Block a user