Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestion: Support for timeseries data #52

Open
archiewood opened this issue Aug 12, 2024 · 1 comment
Open

Feature suggestion: Support for timeseries data #52

archiewood opened this issue Aug 12, 2024 · 1 comment

Comments

@archiewood
Copy link

archiewood commented Aug 12, 2024

Firstly, thank you for a wonderful package, love YouPlot

What's the feature?

I often find myself wanting to plot timeseries data. Currently the best solution i've found is converting to unix timestamps, but these are not human readable.

It would be good to be able to plot timeseries data using youplot, where a column of data is provided as a date or datetime.

This would be for:

  • line
  • lines
  • (possibly) scatter
  • (possibly) density

Unicode plot accepts both Date and DateTime types, so this is pretty possible (but may need to work around this bug)

Examples

date
CleanShot 2024-08-12 at 18 09 55

datetime
CleanShot 2024-08-12 at 18 11 22

Potential UX

I'm very open to suggestions here.

A solution that would not cause any breaking changes would be something like

  • uplot lines --xtype date
  • uplot lines --xtype datetime

If you are still considering the API pre-1.0, then an alternative would be to autodetect the type of the x column, and use that to determine what is used

  • uplot lines
  • uplot lines

PR

I would happily open a PR for this feature if you are open to it

@kojix2
Copy link
Member

kojix2 commented Aug 12, 2024

Hi @archiewood
This is an interesting idea. It would be worth merging if this feature is implemented.
Looking at the implementation you will see that YouPlot is a small UnicodePlot wrapper. Somehow this project suddenly got a lot of stars, but nothing has changed since it had about 30 GitHub stars. the API is open to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants