UnicodePlots examples; Plotly licensing


If it is really only just about having a quick and dirty look from the terminal, then maybe this does the job:

julia> using UnicodePlots

julia> histogram(randn(1000))
   (-4.0,-3.0] │ 2                                      │ 
   (-3.0,-2.0] │▇▇ 20                                   │ 
   (-2.0,-1.0] │▇▇▇▇▇▇▇▇▇▇▇▇▇ 133                       │ 
    (-1.0,0.0] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 346 │ 
     (0.0,1.0] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 338  │ 
     (1.0,2.0] │▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 141                      │ 
     (2.0,3.0] │▇▇ 19                                   │ 
     (3.0,4.0] │ 1                                      │ 

How to choose a plotting package?

I knew of it, but it doesn’t handle my case (yet… not complaining, didn’t expect it to; I see however it even has color, that I didn’t expect):

julia> histogram(rand(Char, 1000))
ERROR: MethodError: Cannot convert an object of type Type{Char} to an object of type AbstractFloat


What do you expect it to show? Do you treat Char as a number? or are you interested in the number of times each character occurs in your vector? In the later case you may be looking for a barplot instead of a histogram

julia> using UnicodePlots

julia> barplot(StatsBase.countmap(['a','c','a','a','c']))
   a │▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ 3 │ 
   c │▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ 2             │ 


YES! Thanks. Still should really look into Plots.jl…

barplot(StatsBase.countmap(map(Char, rand(32:127, 1000))))

Sorry for draging this out, just answering ot show a minor indenting bug, that is no big deal to me…:

   i │▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ 9                       │ 
    │▪▪▪▪▪▪▪▪▪▪▪▪ 7                          │ 
   K │▪▪▪▪▪▪▪▪▪▪▪▪ 7                          │ 


Yes (and no…) “Try free edition” implies non-free (as in speech) to me, but here that seems not the case. [Maybe you meant “no-cost” anyway? That also applies.]

I confirmed PlotlyJS (and Plotly that uses it) are under the MIT “Expat” License.

It seems you should have no freedom issues as in PlotlyJS.jl github repo, I also see same MIT for dependency:


[Good luck with reading that minified code… :slight_smile: it’s still “free software”; just wouldn’t be “GPL-compatible”… In general that would mean not ok to distribute with GPL… (LGPL would be ok) but “arms-length” probably applies here, and js runs in the browser (another process) so I’m pretty sure you’re ok (at least if your GPL would be in non-browser).]

I didn’t check further (other dependencies), it seems everything running on your machine is free. I’m not sure SaaS applies, if so you might have other concerns with that (see Stallman on that too…)…

Not sure what you’re paying for (optionally) - didn’t check - probably just some optional convenience features.


Plots.jl includes Javascript files for it which doesn’t use the cloud service and is free. It builds with Plots.jl, so if you just plot(...) without installing a backend, it will open a browser and use Plotly.


Thanks; this is very useful to know! *

I didn’t realize e.g. [with UnicodePlots]: histogram(randn(1000)); # wouldn’t display anything; not too useful, but is e.g. for big_array=randn(1000);

Somehow the same doesn’t apply to:

display(plot(rand(10,10))); # nor display(plot(rand(10,10));) # not that it matters much - I guess because output goes to non-REPL browser…

julia> a=2;


still an extra newline (for no good reason); myabe should be fixed to conserve screen space…


I too a look at the page (assume PR is in); and Vincent’s code:

Neither works; I’m on Ubuntu 16.04, of course with Python [2.7.12] installed. Strange that PyPlot didn’t work to begin with, and (to me), I guess I was asking for Python install here, but not two versions… older python-2.7.11-0 and newer python-2.7.13 (and [more than one?] [mini]conda… and PyPlot still failes after…:

julia> withenv("PYTHON" => "") do
INFO: Building Conda
INFO: Building PyCall
INFO: No system-wide Python was found; got the following error:
could not spawn `'' -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))"`: no such file or directory (ENOENT)

INFO: Installing miniconda ...
installing: _cache-0.0-py27_x0 ...
installing: python-2.7.11-0 ...

The following packages will be downloaded:

    python-2.7.13              |                0        11.5 MB
    conda-4.2.13               |           py27_0         391 KB


[PS. Is it only me, is Discourse slow? Annoyingly, order of letters that I type in, keep appearing in the incorrect order… I guess it’s a general [here: Brave beta w/“load average: 0,11”] browser issue (Chrome derivative; if I recall happened before with it and/or Firefox; what’s the best browser…?)… Happens on other websites, such as Quora (but not in the REPL).]


A minified version is not a fair way to judge readability or make this assertions about plotly.js. (unless I am misunderstanding the point you are trying to make)

Plotly.js is on github and the code is fairly readable


Yes, about readability, I’ve now added the :slight_smile: I should have put there. However my main point was the GPL (potential) issue:

“As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted)”

meaning new in GPLv3, and its absense in GPLv2 (and other wording) meaning, considered there binary, ont ok as a source; not allowed to redistribute as such, without “corresponding source”, e.g. the non-minified version). See also e.g. LibreJS.]