Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Shift between axis frame and ticks / image #28

Closed
cdeil opened this issue May 12, 2014 · 5 comments
Closed

Shift between axis frame and ticks / image #28

cdeil opened this issue May 12, 2014 · 5 comments

Comments

@cdeil
Copy link
Contributor

cdeil commented May 12, 2014

I wanted to try out wcsaxes, so I pasted the examples from the docs into a notebook (located here.
As you can see the axis frame is often shifted from the ticks and image, i.e. it doesn't work for me (wcsaxes version a44c658, matplotlib version 1.3.1).

@astrofrog Do you plan to maintain the WCSAxes Demo notebook?
If yes, could you include a command to download the example FITS files (or include them in the notebook if that is possible) so that one can start playing with wcsaxes?

cc @anizami

@jzuhone
Copy link

jzuhone commented May 15, 2014

I had a similar issue, I tracked it down to changeset 2a6f05e, lines 109-110 of frame.py:

if self._update_cache == [xmin, xmax, ymin, ymax]:
    return
self._update_cache = [xmin, xmax, ymin, ymax]
self._sample_cache = {}

If this logic is removed, then I get the correct behavior. @cdeil can you try verifying this for what you saw? @ChrisBeaumont any ideas?

@ChrisBeaumont
Copy link
Contributor

Ah interesting, I wonder if this is an issue related to how figures are rendered into the notebook. I'll investigate

@astrofrog
Copy link
Owner

@ChrisBeaumont - it looks like _sample_cache is never actually populated - is that normal?

@ChrisBeaumont
Copy link
Contributor

Since this is obviously broken on the notebook, I think the short term solution is to drop the caching stuff (setting spine.data seems to have side effects, even when being set to the same value as before. But I can't figure out what they are).

@cdeil
Copy link
Contributor Author

cdeil commented May 22, 2014

@ChrisBeaumont Thanks for fixing this ... wcsaxes now works in the IPython notebook: http://nbviewer.ipython.org/gist/cdeil/36243e307090c7a740ba

@cdeil cdeil closed this as completed May 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants