Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Qt backend's Figure options to support axis units #19075

Closed
@soininen

Description

@soininen

Problem

We often use datetimes on X axis. However, Qt backend's figure options dialog converts these to floating point numbers making it all but possible to edit the axis xmin and xmax.

Proposed Solution

Make the options dialog deal with axis units more properly, e.g. datetimes could be shown usingQDateTimeEdit widget.

I managed to get this working for datetimes and X axis on a monkey-patched options dialog by replacing line 37 inmatploglib/backends/qt_editor by

ifisinstance(axes.xaxis.converter,DateConverter):xmin,xmax=tuple(num2date(lim)forliminaxes.get_xlim())else:xmin,xmax=map(float,axes.get_xlim())

Would this be an acceptable way of dealing with the units in general? I would be willing to work on a Pull request on this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp