glue icon indicating copy to clipboard operation
glue copied to clipboard

Plot axis title incorrectly capitalized when acronym is given

Open pllim opened this issue 3 years ago • 4 comments

https://github.com/glue-viz/glue/blob/164424f0845186702d471bacad668f272eadd0ff/glue/core/coordinate_helpers.py#L167

If I define a custom coordinate and then, say, implement the following:

    @property
    def world_axis_names(self):
        # Returns an iterable of strings given the names of the world
        # coordinates for each axis.
        return ['MJD']

The plot writes "Mjd" and not "MJD". Since MJD really stands for Modified Julian Date, the capitalization "Mjd" is wrong and there is no way for me to turn it off.

xref spacetelescope/jdaviz#1181

pllim avatar Mar 22 '22 14:03 pllim

What would you suggest – remove the .title() entirely, or only call it if name.islower(), or add a kwarg to override it?

dhomeier avatar Apr 01 '22 00:04 dhomeier

Remove title() is preferred for me but I don't know if there was a good reason to capitalize in the first place.

pllim avatar Apr 01 '22 00:04 pllim

🤷

dhomeier avatar Apr 01 '22 00:04 dhomeier

Removing title seems sensible, not sure why it was there in the first place - could you do a PR @dhomeier?

astrofrog avatar May 19 '22 13:05 astrofrog