using Gadfly and PyPlot at the same time

322 views
Skip to first unread message

Andrei Berceanu

unread,
Mar 6, 2015, 8:05:19 AM3/6/15
to julia...@googlegroups.com
Hi guys,

when I do

using Gadfly, PyPlot

i get
Warning: using PyPlot.plot in module Main conflicts with an existing identifier.

And other warning of the same type. How can I solve this?

Andreas Lobinger

unread,
Mar 6, 2015, 8:12:15 AM3/6/15
to julia...@googlegroups.com
Hello colleague,

I guess to solve this, you need to work on the packages (or even the julia logic for exporting). Still you should be able to use (as this is a warning only) both .plot by prefixing Gadly.plot and PyPlot.plot. 

René Donner

unread,
Mar 6, 2015, 8:16:58 AM3/6/15
to julia...@googlegroups.com
To get rid of name clashed you could e.g. also say

import Gadfly
using PyPlot

Like this "plot" will refer to PyPlot.plot, and you can use "Gadfly.plot" anytime you need Gadfly's plot.

You can find more info here: http://docs.julialang.org/en/release-0.3/manual/modules/#summary-of-module-usage

Andrei Berceanu

unread,
Mar 6, 2015, 9:42:34 AM3/6/15
to julia...@googlegroups.com
ok so now im doing import PyPlot, but have some problems with the latex axis labels

this used to work before
ax[:set_xlabel](L"$\kappa$")
while now it gives
@L_str not defined
so i tried
ax[:set_xlabel](PyPlot.L"$\kappa$")
which gives
syntax: invalid interpolation syntax: "\"

Steven G. Johnson

unread,
Mar 6, 2015, 11:12:36 AM3/6/15
to julia...@googlegroups.com


On Friday, March 6, 2015 at 9:42:34 AM UTC-5, Andrei Berceanu wrote:
ok so now im doing import PyPlot, but have some problems with the latex axis labels

you could try

   using LaTeXStrings 

to pull in the L_str macro separately from PyPlot.   (I'm not sure if there is any nice syntax for using unimported string macros.)
Reply all
Reply to author
Forward
0 new messages