astropy / astropy/astropy

WCSAxes Major Formatter Does Not Update When Format Unit is Changed

Open
#9,516 3 comments 0 reactions 0 assignees View on GitHub
visualization.wcsaxes
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 20h
Merged PRs (30d)
81

Description

### Description

The WCSAxes Major Formatter Does Not Update When Format Unit is Changed.

### Expected behavior

Expected behaviour is that the Major formatter updates itself such that an appropriate precision is used by on the units.

### Actual behavior

The above does not happen. In the below example, the y axis is stored in the WCS as metres and then changed to nm for the plot. However, as can be seen the precision is kept leading to many extraneous 0s.
![image](https://user-images.githubusercontent.com/6806704/67985305-f019d300-fbfe-11e9-9608-71f4d9d42385.png)

Contributor guide

Open the contributing guide

Research direction

Start by locating the WCSAxes major formatter and the code path that handles changing a format unit. Reproduce the reported metres-to-nanometres y-axis example and compare the displayed precision before and after the change. Done means the formatter recalculates precision for the new unit without extraneous zeros.

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.