Cannot save Gadfy plot, requires Cairo+Fontconfig although its installed

plotting
gadfly

#1

I am struggling with saving a simple Gadfly plot in PNG format.

using Cairo
using Fontconfig
using Gadfly
myplot =plot(x=rand(10), y=rand(10), Geom.point, Geom.line)

draw(PNG("myplot.png", 4inch, 3inch), myplot)

The code above gives the following error:

Cairo and Fontconfig are necessary for the PNG backend. Run:
Pkg.add(“Cairo”)
Pkg.add(“Fontconfig”)
You also have to delete C:\\\\\\\\\\\\\\\\\\\\\\\\\\\Users\Bruker\AppData\Local\JuliaPro-0.6.0.1\pkgs-0.6.0.1\v0.6v0.6\Compose.ji
and restart your REPL session afterwards.
in PNG at Compose\src\Compose.jl:170

When running

  Pkg.add("Cairo")
  Pkg.add("Fontconfig")

i get notified that the packages are already installed. I would very much appreciate any help with this :slight_smile:


#2

Have you done this also and rebuild Compose?


#3

I eventually found the file, deleted it and ran Pkg.build("Compose") and restarted Julia. Now it runs like a dream. Thx