Giter VIP home page Giter VIP logo

Comments (6)

carstenbauer avatar carstenbauer commented on May 17, 2024 5

Kindly bumping again. Would love to have simple savefig function in UnicodePlots!

from unicodeplots.jl.

digital-carver avatar digital-carver commented on May 17, 2024 3

Other than that I am a bit reluctant now to make a special save method since it is probably best to just treat a Plot like one would a string

In my opinion there's value in providing the common interface, such as the savefig method. A lot of the value of Plots.jl is in not having to relearn slightly different interfaces every time, instead having a common reliable interface. Having the "obvious thing" (saving with savefig) would lead a smoother interface, even if all it did underneath was a print.

from unicodeplots.jl.

Evizero avatar Evizero commented on May 17, 2024

@tbreloff I'll soon implement a save to txt file method. What would you suggest the method name/signature to be? safefig(myplot, "filename.txt") or would you suggest avoiding name collisions?

from unicodeplots.jl.

tbreloff avatar tbreloff commented on May 17, 2024

Cool! Shouldn't matter to me... I only ever import, so all calls are
prefaced (UnicodePlots.savefig, etc). Feel free to use the same naming as
in Plots.

On Thu, Oct 29, 2015 at 4:38 PM, Christof Stocker [email protected]
wrote:

@tbreloff https://github.com/tbreloff I'll soon implement a save to txt
file method. What would you suggest the method name/signature to be? safefig(myplot,
"filename.txt") or would you suggest avoiding name collisions?


Reply to this email directly or view it on GitHub
#28 (comment)
.

from unicodeplots.jl.

Evizero avatar Evizero commented on May 17, 2024

Alright. Looking at this now it seems I don't obey the subtle intended distinction between show and print, resulting in print writing color decorated text into any stream (even files), which make them unreadable. So that's the first thing to fix.

Other than that I am a bit reluctant now to make a special save method since it is probably best to just treat a Plot like one would a string (i.e. write them to a file the same way). An option to save the fully color decorated string may be useful though. especially if I ever want to create real tests for this package.

from unicodeplots.jl.

hustf avatar hustf commented on May 17, 2024

Bump.
Perhaps there's an obvious way, without a modification here? If so, I haven't been able to figure it out. When print or show to a file, an IOStream I get:

"�[37m"
and so forth.

I've been copying from the REPL to a text file, which works but gets boring.

from unicodeplots.jl.

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.