-
Notifications
You must be signed in to change notification settings - Fork 1
Adding input options #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| raise ValueError(self._param['Variable']+"not a valid option for parameter Variable") | ||
|
|
||
|
|
||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: