ERROR: LoadError: UndefVarError: plot not defined

911 views
Skip to first unread message

Hayford Adjavor

unread,
Jun 19, 2018, 3:20:10 PM6/19/18
to julia-pomdp-users
Hi team Julia Community,
I shall be glad for your help with the above-stated issue. I am trying to use both the 'Gadfly' and 'PyPlot' plotting functionality in Julia, but I keep getting the above-mentioned error. I have done all I can at this point including following the instructions at - https://stackoverflow.com/questions/14970817/plot-not-defined-with-julia -, but no avail. 

Thanks in advance for your help with this issue.
julia_REPL.PNG
julia_Error_Screen.PNG

Brett Israelsen

unread,
Jun 19, 2018, 6:05:34 PM6/19/18
to julia-pomdp-users
It is probably best to ask this question in the discourse community https://discourse.julialang.org/, under the 'Usage'->'First Steps' category since this is not directly related to the POMDPs.jl package.

Based on what you have provided I would guess that since you have two packages loaded each of which have a `plot' function, you will need to specify `PyPlot.plot()` or `Gadfly.plot()` based on which package you would like to plot with.

Having said that, if this doesn't work you will probably still want to post this in the discourse forum with some more detail about your problem. Specifically what code you are trying to run when you get the error.

Good luck!

Zachary Sunberg

unread,
Jun 19, 2018, 7:02:25 PM6/19/18
to julia-pomdp-users
Thanks for answering this, Brett!

Zachary Sunberg

unread,
Jun 19, 2018, 7:10:04 PM6/19/18
to julia-pomdp-users
Hayford, Did you try this?

using PyPlot

plot
([1,2],[3,4])

Perhaps you forgot to run `using` to import the package. You need to do this in addition to installing it. (as Brett suggested, this question belongs on discourse, but I thought I would suggest this in case the fix is this simple :) )

Hayford Adjavor

unread,
Jun 19, 2018, 9:04:27 PM6/19/18
to julia-pomdp-users
Hi Brett and Zachary,

Thank you very much! I will be sure to use the Julialang community link the next time. However, I have tried both suggestions and attached is the new error message I am getting.  

Thank you again for the assistance!
new_Error.PNG

Hayford Adjavor

unread,
Jun 19, 2018, 10:21:58 PM6/19/18
to julia-pomdp-users
Thanks Brett, I will check it out! 
Reply all
Reply to author
Forward
0 new messages