Git Product home page Git Product logo

Comments (6)

JoshKarpel avatar JoshKarpel commented on May 27, 2024 2

Hi @JoshKarpel I just added such a function in version 0.4.4 🚢

Haven't gotten around to do the "hard cap on line length" part yet, but hope this helps already.

If you can share I'd be curious to see what you end up with on your side!

It's working really well so far! JoshKarpel/spiel#33

image

from uniplot.

JoshKarpel avatar JoshKarpel commented on May 27, 2024 1

So let's say you had a function plot_to_string that has the same signature as plot but without the interactive option, would that help already?

Definitely!

In particular right now uniplot does not guarantee a horizontal dimension, as width is the width option plus how much space the vertical axis labels take. Depending on how you want to integrate the output, would that be an issue for you?

I don't think it's a deal breaker, but it might make things easier. I could certainly do without it for a first pass!

My current thinking is that I'll probably be sticking the plot output inside a https://rich.readthedocs.io/en/stable/reference/text.html#rich.text.Text , and I can disable wrapping - but that means the plot might get cut off if I don't guess the width right.

from uniplot.

olavolav avatar olavolav commented on May 27, 2024 1

Thanks @JoshKarpel!

I'll have a look over the weekend, but I think it shouldn't be too hard, might actually end up with more readable code when splitting the plot generation and text output.

I also thought about limiting the bounding box of the plot, this should also be possible by computing the vertical axis labels first, and then shrinking the plot window if needed. But I'll leave this for a later date.

from uniplot.

olavolav avatar olavolav commented on May 27, 2024

Hi @JoshKarpel thanks for the request!

Should be possible fairly easily. So let's say you had a function plot_to_string that has the same signature as plot but without the interactive option, would that help already?

In particular right now uniplot does not guarantee a horizontal dimension, as width is the width option plus how much space the vertical axis labels take. Depending on how you want to integrate the output, would that be an issue for you?

from uniplot.

olavolav avatar olavolav commented on May 27, 2024

Hi @JoshKarpel I just added such a function in version 0.4.4 🚢

Haven't gotten around to do the "hard cap on line length" part yet, but hope this helps already.

If you can share I'd be curious to see what you end up with on your side!

from uniplot.

olavolav avatar olavolav commented on May 27, 2024

Very cool! 😄 Looking forward to see how Spiel progresses

from uniplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.