Skip to content
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

logscale plot axes limit issues #381

Closed
williamjameshandley opened this issue Apr 20, 2024 · 0 comments · Fixed by #383
Closed

logscale plot axes limit issues #381

williamjameshandley opened this issue Apr 20, 2024 · 0 comments · Fixed by #383

Comments

@williamjameshandley
Copy link
Collaborator

williamjameshandley commented Apr 20, 2024

Still trying to diagnose the cause of the issue, but I have managed to boil it down to this MWE:

from anesthetic import MCMCSamples, make_2d_axes
import numpy as np
fig, axes = make_2d_axes(['a', 'b'], logx=['a', 'b'], logy=['a', 'b'])
samples_2 = MCMCSamples(np.exp(np.random.randn(10000,2)*2), columns=['a', 'b'])
samples_2.plot_2d(axes)
samples_1 = MCMCSamples(np.exp(np.random.randn(10000,2)*0.5-10), columns=['a', 'b'])
samples_1.plot_2d(axes)

Figure_1

The axes limits are not updated correctly for the second plot. This is likely down to the twinx behaviour not quite doing the right thing for log-scale axes.

Following from @lukashergt's excellent work in #328, #362, #372

@williamjameshandley williamjameshandley changed the title logscale plot issues logscale plot axes limit issues Apr 20, 2024
lukashergt added a commit that referenced this issue Apr 23, 2024
…cale axes, adjusting to new data limits, see issue #381
lukashergt added a commit that referenced this issue Apr 24, 2024
* test that limits get accurately updated by successive plots with logscale axes, adjusting to new data limits, see issue #381

* fix typo from PR #324

* bump version to 2.8.10

* update logscale plot limits to datalimits at the end, making use of `ax.dataLim`
AdamOrmondroyd pushed a commit to AdamOrmondroyd/anesthetic that referenced this issue May 28, 2024
* test that limits get accurately updated by successive plots with logscale axes, adjusting to new data limits, see issue handley-lab#381

* fix typo from PR handley-lab#324

* bump version to 2.8.10

* update logscale plot limits to datalimits at the end, making use of `ax.dataLim`
AdamOrmondroyd added a commit that referenced this issue Jun 24, 2024
* allow matplotlib 3.9

* bump version to 2.8.10

* Fix logscale limit updates (#383)

* test that limits get accurately updated by successive plots with logscale axes, adjusting to new data limits, see issue #381

* fix typo from PR #324

* bump version to 2.8.10

* update logscale plot limits to datalimits at the end, making use of `ax.dataLim`

* Fix macOS CI (#385)

* attempt at fixing macOS CI by brew installing hdf5

* update from `miniconda@v2` to `miniconda@v3`

* bump version to 2.8.11

* try newer `tables` version, which was previously restricted to 3.8.0 in #379

* Revert "attempt at fixing macOS CI by brew installing hdf5"

This reverts commit 968bdb3.

* Reapply "attempt at fixing macOS CI by brew installing hdf5"

This reverts commit 204014a.

Seems like this is needed after all, otherwise macOS is struggling to
find a local HDF5.

---------

Co-authored-by: Will Handley <[email protected]>

* Fix to `color='C2'` plot_2d error post pandas 2 (#382)

* Added failing test

* bump version to 2.8.10

* Get color from self.color

* Update README.rst

* Update _version.py

* Update README.rst

* Update _version.py

---------

Co-authored-by: Lukas Hergt <[email protected]>

* bump version to 2.8.10

* bump version to 2.8.11

* bump version to 2.8.13

---------

Co-authored-by: Lukas Hergt <[email protected]>
Co-authored-by: Will Handley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant