astropy / astropy/astropy

Hiding only axis labels when plotting using wcs as projection

Open
#13,791 1 comment 0 reactions 0 assignees View on GitHub
Bug visualization.wcsaxes
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 19h
Merged PRs (30d)
75

Description

From the astropy slack:

The [astropy doc](https://docs.astropy.org/en/stable/visualization/wcsaxes/ticks_labels_grid.html) only shows how to hide the ticks, but with the ticks the labels are also hidden.

If I only want to hide the axis labels and not the tick labels, I would expect to use `ax[1][1].coords[1].set_axislabel("")`. However,
I'm still getting pos.eq.dec as labels on the plot, and if I do `ax[1][1].coords[1].set_ticklabel_visible(False)` then the y axis label disappears and the tick labels also disappear.

The temporal solution to this is adding an space instead of an empty string e.g `ax[1][1].coords[1].set_axislabel(" ")`.

Contributor guide

Open the contributing guide

Research direction

Start with the WCSAxes ticks, labels, and grid documentation and reproduce the behavior using ax[1][1].coords[1].set_axislabel("") and set_ticklabel_visible(False). Trace how the coordinate axis label visibility is handled, then verify that an empty axis-label string hides only that label while tick labels remain visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.