Julia iPython notebook doesn't display inline graphics

1,195 views
Skip to first unread message

Bruno Morgado

unread,
Sep 7, 2014, 9:51:19 AM9/7/14
to julia...@googlegroups.com
Hi all,

I'm trying to get started with Julia but I'm having some troubles.

After finally getting to get iJulia to run and starting a notebook in the browser, I can finally follow and execute all the code, but I still can't see any inline graphs.
The code runs correctly (first it complained about missing Cairo but I installed that), but it doesn't show anything inline.

How do I fix this?

Shashi Gowda

unread,
Sep 7, 2014, 10:16:47 AM9/7/14
to julia...@googlegroups.com
Which package are you using for plotting? Gadfly and PyPlot currently work well with IJulia as far as I know.

RecentConvert

unread,
Dec 9, 2014, 11:15:23 AM12/9/14
to julia...@googlegroups.com
It's not working for me either. PyPlot will plot to an external window but I can't seem to get it to plot inline in the notebook. I've even tried other input arguments as well with no luck.

ipython notebook --matplotlib=qt --profile=julia

Kubuntu 14.04 64-bit
Qt 4.8.6
Julia Version 0.3.2
Commit 8227746* (2014-10-21 22:05 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
  WORD_SIZE: 64
           Ubuntu 14.04.1 LTS
  uname: Linux 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64
Memory: 15.586982727050781 GB (10886.7734375 MB free)
Uptime: 31616.0 sec
Load Avg:  0.3779296875  0.29638671875  0.2958984375
Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz:
       speed         user         nice          sys         idle          irq
#1   800 MHz     159332 s       3587 s      63328 s    2834790 s          8 s
#2   800 MHz     162030 s       4625 s      59546 s    2828052 s          0 s
#3  3201 MHz     162877 s       5141 s      61669 s    2804879 s          1 s
#4   800 MHz     153968 s       5087 s      64039 s    2836716 s          0 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
Environment:
  TERM = xterm
  XDG_SESSION_PATH = /org/freedesktop/DisplayManager/Session0
  XDG_SEAT_PATH = /org/freedesktop/DisplayManager/Seat0
  DEFAULTS_PATH = /usr/share/gconf/kde-plasma.default.path
  PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
  MANDATORY_PATH = /usr/share/gconf/kde-plasma.mandatory.path
  HOME = /home/somebody
  PROFILEHOME =
  QT_PLUGIN_PATH = /home/somebody/.kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/
  PYTHONHOME = /usr:/usr

Package Directory: /home/somebody/.julia/v0.3
6 required packages:
 - DataFrames                    0.5.12
 - Dates                         0.3.2
 - Distributions                 0.6.1
 - IJulia                        0.1.16
 - PyPlot                        1.4.3
 - ZMQ                           0.1.15
18 additional packages:
 - ArrayViews                    0.4.8
 - BinDeps                       0.3.7
 - Color                         0.3.14
 - Compat                        0.2.5
 - DataArrays                    0.2.5
 - FixedPointNumbers             0.0.6
 - GZip                          0.2.13
 - JSON                          0.3.9
 - LaTeXStrings                  0.1.2
 - Nettle                        0.1.7
 - PDMats                        0.3.1
 - PyCall                        0.7.1
 - REPLCompletions               0.0.3
 - Reexport                      0.0.2
 - SHA                           0.0.3
 - SortingAlgorithms             0.0.2
 - StatsBase                     0.6.10
 - URIParser                     0.0.3

Steven G. Johnson

unread,
Dec 9, 2014, 1:42:51 PM12/9/14
to julia...@googlegroups.com


On Tuesday, December 9, 2014 11:15:23 AM UTC-5, RecentConvert wrote:
It's not working for me either. PyPlot will plot to an external window but I can't seem to get it to plot inline in the notebook. I've even tried other input arguments as well with no luck.

ipython notebook --matplotlib=qt --profile=julia

What is the output of:

using PyPlot
PyPlot.backend

?  Note that --matplotlib=qt does nothing in IJulia AFAIK.   If you want to force the Qt backend, you should either put that in your .matplotlibrc file or do:

using PyCall
pygui(:qt)
using PyPlot

RecentConvert

unread,
Dec 11, 2014, 4:40:10 AM12/11/14
to julia...@googlegroups.com
using PyPlot
PyPlot.backend

"qt4agg"

RecentConvert

unread,
Dec 16, 2014, 8:33:27 AM12/16/14
to julia...@googlegroups.com
In my case the problem turned out to be my .juliarc.jl file. My guess is that loading PyPlot there had caused plots to be plotted in a separate window. The result of the same command are still "qt4agg".

Steven G. Johnson

unread,
Dec 17, 2014, 1:07:09 PM12/17/14
to julia...@googlegroups.com
On Tuesday, December 16, 2014 8:33:27 AM UTC-5, RecentConvert wrote:
In my case the problem turned out to be my .juliarc.jl file. My guess is that loading PyPlot there had caused plots to be plotted in a separate window. The result of the same command are still "qt4agg".

Yes, that would cause a problem because using PyPlot in your juliarc would initialize PyPlot before IJulia is loaded, and hence PyPlot would "think" that it's not in an IJulia environment.  Hence it wouldn't set up inline display.
Reply all
Reply to author
Forward
0 new messages