Separate x and y flags for AxisItem.setLogMode#2081
Conversation
|
|
||
| ```bash | ||
| python -m pytest examples tests | ||
| python -m pytest pyqtgraph/examples tests |
|
Hi @max-radin, That is interesting, because I think the code that seems to break here is newer than the issue #997. I am currently looking at the log-mode propagation from another angle... I currently think that it might be better to tell the ViewBox about the requested log mode settings from inside Doesn't each of the four potential axes set both x and y mode individually, now? |
|
Ah, sorry, I missed the actual broken bit here. While I am not sure if
|
|
Hi @NilsNemitz, one way we could support the old single-argument behavior would be to do something like def setLogMode(self, *args, **kwargs):
if len(args) == 1 or 'log' in kwargs:
# do the old thing
else:
# do the new thingThat way calling Pros:
Cons:
Do you think this makes sense to do? I'm pretty new to the codebase so I don't really have a sense of how these methods typically get used. |
|
I think that is a good idea. |
|
@NilsNemitz just pushed a commit that adds backwards compatibility for the single argument case. thanks! |
|
@max-radin thanks for the PR! This LGTM, merging. @NilsNemitz thanks for reviewing! |
* Updating pytest command in CONTRIBUTING.md * Separating x and y flags in AxisItem.setLog; fixes pyqtgraph#997 * Updated AxisItem.setLogMode to be backwards compatible
This fix allows the example code from #997 to be run. I also checked that the logAxis.py example looks the same after this change.