Status of Plots.jl?

1,735 views
Skip to first unread message

Daniel Carrera

unread,
Mar 10, 2016, 8:11:57 AM3/10/16
to julia-users
Hello,

Does anyone know the status of Plots.jl? It seems to have come a long way. At least the documentation makes it look pretty complete:


I'm looking at the backends. Does anyone know what "Gr", "Qwt", and "unicodeplots" are? Apparently support for Winston was dropped?


I don't use Winston, but I'm curious to know what happened. Was Winston hard to support?

I am currently using PyPlot because I need the maturity of Matplotlib, but I am happy to see all the effort that's going into making a native plotting library for Julia.

Cheers,
Daniel.

Tom Breloff

unread,
Mar 10, 2016, 8:18:23 AM3/10/16
to julia-users
Yes it's come a long way.  Documentation is coming slower than functionality (typical open source...).  However I added this yesterday, which should help answer a few questions:  http://plots.readthedocs.org/en/latest/backends/

If you want to follow the latest and greatest, the issues list is where to go.  Let me know if you have any questions... I'm happy to help.

Tom

Daniel Carrera

unread,
Mar 10, 2016, 10:54:23 AM3/10/16
to julia...@googlegroups.com
On 10 March 2016 at 14:18, Tom Breloff <t...@breloff.com> wrote:
Yes it's come a long way.  Documentation is coming slower than functionality (typical open source...).  However I added this yesterday, which should help answer a few questions:  http://plots.readthedocs.org/en/latest/backends/


According to your table PyPlot can do everything :-)  I never thought PyPot was fast. I thought Matplotlib was famous for being slow. Ok. I updated Plots.jl and installed a few backends to play with (damn.. gadfly seems to depend on everything). Some scattered comments / questions:

- It's looking great! Good job.

- On my computer PyPlot is the default. Is that true for everyone or just me?

- GR is 100x faster than PyPlot, but it's ugly. The plot is all pixelated. Is there a setting to make it look nice? The plots on the documentation look nice.

- How do I try the unicode plots? I tried `unicode()` but that function doesn't exist.

- Are Plotly and Gadfly supposed to just open a static plot (SVG?) on my browser? That seems weird.

- I tried Immerse, but it just died on me. :-(

INFO: Precompiling module Immerse...
ERROR: LoadError: LoadError: UndefVarError: absolute_native_units not defined
...
ERROR: Failed to precompile Immerse to /home/daniel/.julia/lib/v0.4/Immerse.ji


- It's weird that the heatmap() makes hexagons on PyPlot but a regular grid on the other backends.


I'll play more with Plots.jl later. But it's nice to see an attempt at a unified plotting package for Julia.

Cheers,
Daniel.

Tom Breloff

unread,
Mar 10, 2016, 11:03:02 AM3/10/16
to julia-users
On Thu, Mar 10, 2016 at 10:54 AM, Daniel Carrera <dcar...@gmail.com> wrote:

On 10 March 2016 at 14:18, Tom Breloff <t...@breloff.com> wrote:
Yes it's come a long way.  Documentation is coming slower than functionality (typical open source...).  However I added this yesterday, which should help answer a few questions:  http://plots.readthedocs.org/en/latest/backends/


According to your table PyPlot can do everything :-)  I never thought PyPot was fast. I thought Matplotlib was famous for being slow. Ok. I updated Plots.jl and installed a few backends to play with (damn.. gadfly seems to depend on everything). Some scattered comments / questions:

Quick tip: checkout the master or dev branches... I don't tag releases very often.
 

- It's looking great! Good job.

Thanks.
 

- On my computer PyPlot is the default. Is that true for everyone or just me?

True for everyone (though that may change...)
 

- GR is 100x faster than PyPlot, but it's ugly. The plot is all pixelated. Is there a setting to make it look nice? The plots on the documentation look nice.

If you plot in IJulia it should produce nice looking SVG


- How do I try the unicode plots? I tried `unicode()` but that function doesn't exist.

`unicodeplots()`... just like the package name
 

- Are Plotly and Gadfly supposed to just open a static plot (SVG?) on my browser? That seems weird.

Yes.  If you don't like it, use another backend!
 

- I tried Immerse, but it just died on me. :-(

Not sure on that one.  Clear your cache and Pkg.update()?
 

INFO: Precompiling module Immerse...
ERROR: LoadError: LoadError: UndefVarError: absolute_native_units not defined
...
ERROR: Failed to precompile Immerse to /home/daniel/.julia/lib/v0.4/Immerse.ji


- It's weird that the heatmap() makes hexagons on PyPlot but a regular grid on the other backends.

Heatmaps are under active development... see https://github.com/tbreloff/Plots.jl/issues/147

Michele Zaffalon

unread,
Mar 10, 2016, 11:35:43 AM3/10/16
to julia...@googlegroups.com
On Thu, Mar 10, 2016 at 4:54 PM, Daniel Carrera <dcar...@gmail.com> wrote:

On 10 March 2016 at 14:18, Tom Breloff <t...@breloff.com> wrote:
Yes it's come a long way.  Documentation is coming slower than functionality (typical open source...).  However I added this yesterday, which should help answer a few questions:  http://plots.readthedocs.org/en/latest/backends/


According to your table PyPlot can do everything :-)  I never thought PyPot was fast. I thought Matplotlib was famous for being slow. Ok. I updated Plots.jl and installed a few backends to play with (damn.. gadfly seems to depend on everything). Some scattered comments / questions:

- It's looking great! Good job.

- On my computer PyPlot is the default. Is that true for everyone or just me?

- GR is 100x faster than PyPlot, but it's ugly. The plot is all pixelated. Is there a setting to make it look nice? The plots on the documentation look nice.

- How do I try the unicode plots? I tried `unicode()` but that function doesn't exist.

- Are Plotly and Gadfly supposed to just open a static plot (SVG?) on my browser? That seems weird.

It looks like that only GR, Immerse, PyPlot and PlotlyJS have a GUI http://plots.readthedocs.org/en/latest/backends/#for-the-impatient 

j verzani

unread,
Mar 10, 2016, 12:08:10 PM3/10/16
to julia-users
As someone who has watched his calculus students struggle with what should be a trivial task -- the installation of `Plots` on `juliabox`, I've wished it were part of base. The `plotly` backend does not require additional dependencies, so with that as a default, it would be one less hurdle for newcomers.

Tom Breloff

unread,
Mar 10, 2016, 12:23:17 PM3/10/16
to julia-users
On Thu, Mar 10, 2016 at 12:08 PM, j verzani <jver...@gmail.com> wrote:
As someone who has watched his calculus students struggle with what should be a trivial task -- the installation of `Plots` on `juliabox`, I've wished it were part of base.

While in my (very biased) opinion I think Plots should be the first package new users install, I don't think it belongs in base.  (please don't make me rebuild julia to hack on Plots ;)  But I'm wondering... what was so hard about installing on juliabox?  Did the `Pkg` commands not work?
 
The `plotly` backend does not require additional dependencies, so with that as a default, it would be one less hurdle for newcomers.

Right now, it's the default if nothing else is installed: https://github.com/tbreloff/Plots.jl/blob/master/src/plotter2.jl#L74

j verzani

unread,
Mar 10, 2016, 12:49:17 PM3/10/16
to julia-users
It was a precompilation thing that was breaking, but it may have been related to another package, as they were installing a few. But fair enough, it is easier to develop outside of base. Carry on.

Daniel Carrera

unread,
Mar 10, 2016, 2:03:14 PM3/10/16
to julia...@googlegroups.com
On 10 March 2016 at 18:23, Tom Breloff <t...@breloff.com> wrote:

On Thu, Mar 10, 2016 at 12:08 PM, j verzani <jver...@gmail.com> wrote:
As someone who has watched his calculus students struggle with what should be a trivial task -- the installation of `Plots` on `juliabox`, I've wished it were part of base.

While in my (very biased) opinion I think Plots should be the first package new users install, I don't think it belongs in base.  (please don't make me rebuild julia to hack on Plots ;)


I think Plots could be part of the "standard library" (to borrow a term from Python). So it would not be in Base, but it could be pre-installed. Plotting is one of the most common things that scientists and engineers do. Maybe not right now, but when Plots is more mature.

Speaking of which, I'm also having trouble with PlotlyJS.


julia> plotlyjs()
Plots.PlotlyJSPackage()

julia> plot(Plots.fakedata(50,5),w=3)
[Plots.jl] Initializing backend: plotlyjs
INFO: Precompiling module Blink...
INFO: Recompiling stale cache file /home/daniel/.julia/lib/v0.4/Nettle.ji for module Nettle.
ERROR: Cannot find Electron. Try `AtomShell.install()`.
 in electron at /home/daniel/.julia/v0.4/Blink/src/AtomShell/process.jl:49
 ...


For some reason, PlotlyJS seems to think that I am running it from Atom. :-(


Tom Breloff

unread,
Mar 10, 2016, 2:08:23 PM3/10/16
to julia-users
You should read up more on PlotlyJS: http://spencerlyon.com/PlotlyJS.jl/

Or from the Plots docs:

Plotly / PlotlyJS
These are treated as separate backends, though they share much of the code and use the Plotly javascript API.  plotly() is the only dependency-free plotting option, as the required javascript is bundled with Plots. It can create inline plots in IJulia, or open standalone browser windows when run from the Julia REPL.
plotlyjs() is the preferred option, and taps into the great functionality of Spencer Lyon's PlotlyJS.jl. Inline IJulia plots can be updated from any cell... something that makes this backend stand out. From the Julia REPL, it taps into Blink.jl and Electron to plot within a standalone GUI window... also very cool.

Philippe Roy

unread,
Mar 11, 2016, 9:35:07 AM3/11/16
to julia-users
Hi! Nice package Tom. Is this supposed to work inside Atom with the julia "IDE" ? The plots seems to work, but I really don't know where they appear! they're not in the plots pane (I think only Gadfly is supported as of now inside Atom).

Thanks for any help!

Spencer Lyon

unread,
Mar 11, 2016, 11:32:55 AM3/11/16
to julia-users
Hey Daniel,

The issue you're seeing is that PlotlyJS uses Blink to spin up a dedicated electron window as the plotting GUI.

When Blink.jl is installed it doesn't automatically install electron for you, but it does know how to install electron. To do that just enter `using Blink; Blink.AtomShell.install()` and everything should be taken care of for you. Then when you use the plotlyjs backend from the REPL you will get an electron display for your plots. More details on why you want electron as the GUI window here: http://spencerlyon.com/PlotlyJS.jl/syncplots/#electronplot

Also, if you are plotting from an IJulia notebook plotlyjs plots will display in the notebook by default and you won't ever need to install electron. 

Good luck!

Josef Heinen

unread,
Mar 11, 2016, 2:28:00 PM3/11/16
to julia-users
GR.jl is also supported inside Atom, either standalone (see screenshot), or as a backend for Plots.jl or PyPlot.jl (Matplotlib).

Mike Innes

unread,
Mar 11, 2016, 2:41:21 PM3/11/16
to julia-users
Just FYI, this is actually the old Juno on Light Table, not Atom – which I recommend everyone uses at this point :)

Philippe Roy

unread,
Mar 11, 2016, 2:43:09 PM3/11/16
to julia-users
Thanks,

However, I get the "scatter is not defined" by typing your example inside Juno/Atom and Juno/LT.

Tom Breloff

unread,
Mar 11, 2016, 3:01:09 PM3/11/16
to julia-users
I just started using Atom yesterday, and I think it's pretty great.  I spent some time today trying to figure things out, and was able to get Gadfly, PyPlot, and GR going in Atom's PlotPane.  I'm working on Plotly/PlotlyJS right now.  If anyone wants to experiment, check out the dev branch of Plots.

Josef Heinen

unread,
Mar 11, 2016, 3:08:16 PM3/11/16
to julia-users
The convenience layer is WIP, so you have to checkout the GR master branch: Pkg.checkout("GR")

Daniel Carrera

unread,
Mar 11, 2016, 3:48:00 PM3/11/16
to julia...@googlegroups.com
Can you show me how to use GR as a backend for PyPlot / Matplotlib? I read that it was possible but I couldn't figure out how.

Daniel Carrera

unread,
Mar 11, 2016, 3:49:54 PM3/11/16
to julia...@googlegroups.com
It works. Thanks!

jonatha...@alumni.epfl.ch

unread,
Mar 12, 2016, 12:53:21 PM3/12/16
to julia-users
GR seems pretty good, can it uses Gtk to display plots ?

Josef Heinen

unread,
Mar 13, 2016, 12:32:46 PM3/13/16
to julia-users
GR supports the wxWidgets and Qt4 toolkits. Last week I added support for Cairo graphics, which can be used as a drawing library for GTK+. So, support for the GTK+ toolkit is on my radar ...

Andreas Lobinger

unread,
Mar 14, 2016, 6:02:21 AM3/14/16
to julia-users
Hello colleague,


On Sunday, March 13, 2016 at 5:32:46 PM UTC+1, Josef Heinen wrote:
GR supports the wxWidgets and Qt4 toolkits. Last week I added support for Cairo graphics, which can be used as a drawing library for GTK+. So, support for the GTK+ toolkit is on my radar ..

now i start to get confused. GR claims to be a implementation of a GKS with OpenGL. Well, Cairo is another implementation of a GKS and surprisingly is also providing a EGL/OpenGL backend (which is not optimized) along others. Can you give some background, why you would include Cairo into GR?

 

Josef Heinen

unread,
Mar 14, 2016, 3:56:26 PM3/14/16
to julia-users
GR provides its own (native) logical device drivers ("GKS" workstations) for X11 (Un*x), Core Graphics (OS X) and GDI (Windows). These drivers were developed as part of GR (with many other drivers) to achieve more graphics performance and consistent graphics output. For the X11 driver, however, I did not yet implement transparency (as provided by the Xrender extension) knowing that there was already an X11 backend for Cairographics which would support this. After playing around with the new driver, I no longer  have the expectation that it will be a replacement for the existing native backends. I will probably use Cairographics "only" for offscreen rendering and add render extensions to the existing X11 driver - but we'll see ...

The 3D functionality will be available as an alternative to the existing GR3 layer through a new ModernGL library (still WIP)  this summer ...

Dupont

unread,
Mar 23, 2016, 3:24:27 AM3/23/16
to julia-users
Hi,

I tried your dev branch as suggested,

julia> Pkg.status("Plots")
 
- Plots                         0.5.3+             dev



 but when typing in Atom:

using Plots
Plots.gr()
Plots.plot(rand(100))


nothing appeared. Do I have to do something else?

Josef Heinen

unread,
Mar 25, 2016, 11:14:17 AM3/25/16
to julia-users
Which platform are you using? Please try to checkout the master branch: Pkg.checkout("GR")

Tom Breloff

unread,
Mar 25, 2016, 11:24:48 AM3/25/16
to julia-users
There was a problem with the Atom setup... it should be fixed on the dev branch now.  Please let me know if it works for you. (it worked for me)

missp...@gmail.com

unread,
Oct 16, 2016, 12:45:07 PM10/16/16
to julia-users
Hi folks,

I don't seem to be able to have the display of a graph in GR. I'm calling the instructions using Atom. 

could someone post a Hello World example?

thanks, 

Chris Rackauckas

unread,
Oct 16, 2016, 1:24:16 PM10/16/16
to julia-users
using Plots
#Pkg.add("GR")
gr
() # Change the backend
plot
(rand(4,4))

There's a bug with the plot pane where you might need to hit it twice. If that's not working, then it's not setup correctly.
Message has been deleted

Josef Heinen

unread,
Oct 17, 2016, 9:22:51 AM10/17/16
to julia-users
You should probably test (plain) GR first:

using GR
inline("atom")
histogram
(randn(10000))


Did you checkout GR master and download the latest run-time?

Pkg.checkout("GR")
ENV["GRDIR"]=""
Pkg.build("GR")

missp...@gmail.com

unread,
Oct 17, 2016, 10:46:42 PM10/17/16
to julia-users
Thanks a lot Chris and Josef

I was missing the inline("atom")
I hope GR helps me on plotting faster than PyPlot.

thanks,

Josef Heinen

unread,
Oct 20, 2016, 1:23:45 PM10/20/16
to julia-users
GR v0.16.0 should be available soon. I made a PR this morning ...

henri....@gmail.com

unread,
Oct 21, 2016, 2:47:45 AM10/21/16
to julia...@googlegroups.com

Yes it works :)

https://github.com/jheinen/GR.jl/issues/34

Reading this for my problem with mov, I reverse back to suggested. I have got the pic but not the mov

Reply all
Reply to author
Forward
0 new messages