Conversation
| raise ValueError(self._param['Variable']+"not a valid option for parameter Variable") | ||
|
|
||
|
|
||
| """ |
There was a problem hiding this comment.
Why do you start a second docstring here? Btw. never use docstrings to multi line comments, this is very dirty coding!
| else: | ||
| ax1 = ax | ||
| ax1 = self._param['ax'] | ||
| fig1 = self._param['fig'] |
There was a problem hiding this comment.
After this change, shouldn't we remove the argument ax from the plot function? If it is still used somewhere else you should replace it there with the new axis object stored in the kippenhahn object.
| if self._param['log_cmap']: | ||
| data_to_plot = np.log10(np.abs(np.transpose(self._data))) | ||
| else: | ||
| data_to_plot = np.transpose(self._data) |
There was a problem hiding this comment.
Just a matter of style, should you better use the structure:
if self._param['signed_log_cmap']:
...
elif self._param['log_cmap']:
...
else:
...
instead of
if self._param['signed_log_cmap']:
...
else:
if self._param['log_cmap']:
...
else:
...
| ax2.set_ylim([1e-5,1.]) | ||
| else: | ||
| ax2.set_ylim([0.,1.]) | ||
| if ax is not None: |
There was a problem hiding this comment.
Are you sure you don't want to check for self._param['ax'] here?
Even a deeper thought: shouldn't we check, whether self._Xaxis_min, self._Xaxis_max, ... are given? Usually, I'd let the user overwrite old limits, when new ones are given.
Adding input options to the plotting method: