Giter VIP home page Giter VIP logo

Comments (6)

zhuxuangao avatar zhuxuangao commented on June 7, 2024 1

It works! Thanks!

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 7, 2024

I'm sorry I cannot reproduce and it works fine for me, are there any specific statements in your startup.jl file ?
Can you provide the output of versioninfo() ?

julia> using UnicodePlots
julia> histogram(randn(1_000) .* .1, nbins=15, closed=:left)
                  ┌                                        ┐ 
   [-0.3 , -0.25) ┤▌ 3                                       
   [-0.25, -0.2 ) ┤██▊ 18                                    
   [-0.2 , -0.15) ┤███████▎ 45                               
   [-0.15, -0.1 ) ┤█████████████▉ 87                         
   [-0.1 , -0.05) ┤████████████████████████▍ 152             
   [-0.05,  0.0 ) ┤███████████████████████████████████  218  
   [ 0.0 ,  0.05) ┤███████████████████████████▊ 173          
   [ 0.05,  0.1 ) ┤███████████████████████▍ 145              
   [ 0.1 ,  0.15) ┤████████████████▌ 103                     
   [ 0.15,  0.2 ) ┤██████▌ 40                                
   [ 0.2 ,  0.25) ┤█▉ 12                                     
   [ 0.25,  0.3 ) ┤▌ 3                                       
   [ 0.3 ,  0.35) ┤▎ 1                                       
                  └                                        ┘ 
                                   Frequency                 

from unicodeplots.jl.

zhuxuangao avatar zhuxuangao commented on June 7, 2024

Screen Shot 2023-03-31 at 3 08 43 PM

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 7, 2024

I've just tried on julia 1.8.5, and it also works.

Can you try using UnicodePlots.histogram(...), see if that works ?

It is exported here: https://github.com/JuliaPlots/UnicodePlots.jl/blob/master/src/UnicodePlots.jl#L73.

from unicodeplots.jl.

zhuxuangao avatar zhuxuangao commented on June 7, 2024

It works! Thanks! However when I tried scatterplot example:scatterplot(randn(50), randn(50), title="My Scatterplot")
I used both
using UnicodePlots UnicodePlots.scatterplot(randn(50), randn(50), title="My Scatterplot")
and
using UnicodePlots scatterplot(randn(50), randn(50), title="My Scatterplot")

They both produce
Screen Shot 2023-03-31 at 3 15 29 PM
The same issue also appears in
lineplot([1, 2, 7], [9, -6, 8], title="My Lineplot")
Is there anyway to get the same output as yours?

from unicodeplots.jl.

t-bltg avatar t-bltg commented on June 7, 2024

This is probably because your font does not support braille characters.
There is a note in https://github.com/JuliaPlots/UnicodePlots.jl#known-issues.

Alternatively, you can use another canvas, based on ascii characters:

using UnicodePlots
lineplot([1, 2, 7], [9, -6, 8], title="My Lineplot", canvas=DotCanvas, border=:ascii)
                       My Lineplot                
       +----------------------------------------+ 
    10 |.                                       | 
       |:                                     ..| 
       |'.                                 ..'  | 
       | :                              .''     | 
       |  :                          .''        | 
       |  :                       .''           | 
       |   :                  ..''              | 
       |...:.................:..................| 
       |    :           ..'                     | 
       |     :       .''                        | 
       |     :    .''                           | 
       |      :.''                              | 
       |      '                                 | 
       |                                        | 
   -10 |                                        | 
       +----------------------------------------+ 
        1                                      7  

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.