Skip to content

[Bug]: log scale on unitized data #20979

@story645

Description

@story645

Bug summary

Not totally sure if this is a bug, or a feature request, but for now should we maybe add a warning on trying to do log scale w/ dates & categories - i.e. non-float datatypes that the units system converts to floats but the resulting figure strips out all the unit information because it does the math on the underlying floats and doesn't convert back to the units.

Code for reproduction

fig, ax = plt.subplots()
ax.plot(['a','b','c'], 
        [datetime(1999,12,1), datetime(2000,1,1), 
        datetime(2020, 10,1)])
ax.set_xscale('log')
ax.set_yscale('log')

Actual outcome

unit

Expected outcome

probably for the y-axis to still be labled in dates, and the x axis to be labeled in categories (which admittedly is impossible to do in this case)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions