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

In pintk, the "phase" axis label for pre-fit and post-fit appears on the left instead of on the right. #1699

Open
abhisrkckl opened this issue Dec 18, 2023 · 7 comments

Comments

@abhisrkckl
Copy link
Contributor

image

Both phase and time Y axes are shown for "pre-fit" and "post-fit". The phase axis is shown on the right, but its Y label appears on the left for some reason.

@abhisrkckl abhisrkckl added the bug label Dec 18, 2023
@dlakaplan
Copy link
Contributor

which files did you use for this?

@abhisrkckl
Copy link
Contributor Author

This is using one of the simulated datasets I generated for #1673. But the bug appears for any set of par/tim files.

@dlakaplan
Copy link
Contributor

I don't see the same thing.
Screen Shot 2023-12-18 at 5 10 58 PM

@abhisrkckl
Copy link
Contributor Author

abhisrkckl commented Dec 19, 2023

That's surprising. I see the error with the same data files.
image

My system information is as follows:

Created: 2023-12-19T09:34:32.624030
PINT_version: 0.9.6+697.g2d8e13d0
User: Abhimanyu Susobhanan (abhimanyu)
Host: abhimanyu-HP-Envy-x360-2-in-1-Laptop-15-fh0xxx
OS: Linux-6.2.0-37-generic-x86_64-with-glibc2.35
Python: 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]
endian: little
numpy_version: 1.26.0
numpy_longdouble_precision: float128
scipy_version: 1.11.3
astropy_version: 5.3.4
pyerfa_version: 2.0.1.1
jplephem_version: 2.20
matplotlib_version: 3.8.0
loguru_version: 0.7.2
Python_prefix: /home/abhimanyu/miniconda3/envs/pint-noise
PINT_file: /home/abhimanyu/Work/PINT/src/pint/init.py
Environment: conda
conda_prefix: /home/abhimanyu/miniconda3/envs/pint-noise

@dlakaplan
Copy link
Contributor

This could be something to do with Tcl/Tk. Probably not worth a lot of digging from PINT since it seems to be hard to reproduce unless we can find other reports online.

@scottransom
Copy link
Member

Note that I'm also seeing this bug on my Linux system. Thanks to @dlakaplan for pointing this out. I tried to fix it to no avail. The code looks correct. It is quite annoying. I was thinking about overwriting the yaxis label and simply explicitly adding text at the proper position in device coordinates, but I'm not sure how that would work on re-scaling the window etc. I might try it.

@dlakaplan
Copy link
Contributor

I recently used https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.secondary_yaxis.html#matplotlib.axes.Axes.secondary_yaxis instead of twinx - it was a bit easier. But I think it only works in the latest matplotlib and won't work with oldestdeps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants