plotters icon indicating copy to clipboard operation
plotters copied to clipboard

[Feature Request] Consider supporting NaiveTime coordinates

Open HadrienG2 opened this issue 4 years ago • 1 comments
trafficstars

What is the feature ?

It would be nice if plotters could support time-based coordinates based on chrono's NaiveTime type. I would expect such support to be very similar to the existing support for Date and DateTime coordinates.

Why this feature is useful and how people would use the feature ?

This is useful for the same reason that people use Data and DateTime coordinates: to plot data which depends on time. Except here we would be talking about time of day, not time + day, which is occasionally useful.

To give a concrete example, my use case is evaluation of a medical treatment's effect. The effect is not supposed to change from one day to another, although this must be checked, so a superimposed plot of daily time-based traces makes most effective use of the plotting area during initial data exploration.

Additional Information

An interesting edge case related to this feature is that I'm not sure if it's possible to elegantly specify the full 24h range of chrono's NaiveTime type using standard exclusive ranges. Inclusive ranges may be necessary.

HadrienG2 avatar Dec 05 '20 13:12 HadrienG2

As a workaround you can use Duration instead, and format it as time of day on the axes manually. I posted an example here: https://stackoverflow.com/a/65937448/4126843

PHPirates avatar Jan 28 '21 12:01 PHPirates