Chris, That plot statement is aimed at Gadfly, not at PyPlot. I expect somehow PyPlot got imported.
If you’re in REPL, a restart should remove PyPlot.jl. You will need Gadfly, Stan & Mamba. I haven’t used PyPlot a lot, but if a restart doesn’t fix the problem, just send me the full code. Regards, Rob J. Goedman goed...@mac.com > On Nov 22, 2014, at 6:22 AM, Christopher Fisher <fishe...@miamioh.edu> wrote: > > > > Hi- > > I am experiencing difficulty generating plots of MCMC chains with PyPlot. It > was working fine and "just" stopped working. I even reverted to the latest > working version of the code in Dropbox, but to no avail. Here is the code > and the error message: > > p = plot(sim, [:trace, :mean, :density, :autocor], legend=true); > > > > PyError (PyObject_Call) <type 'exceptions.ValueError'> > ValueError('x and y must have same first dimension',) > File > "/Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", > line 2987, in plot > ret = ax.plot(*args, **kwargs) > File > "/Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py", > line 4137, in plot > for line in self._get_lines(*args, **kwargs): > File > "/Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py", > line 317, in _grab_next_args > for seg in self._plot_args(remaining, kwargs): > File > "/Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py", > line 295, in _plot_args > x, y = self._xy_from_xy(x, y) > File > "/Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py", > line 237, in _xy_from_xy > raise ValueError("x and y must have same first dimension") > > while loading In[1], in expression starting on line 117 > > in getindex at /Users/chrisfisher/.julia/PyCall/src/PyCall.jl:642 > in pysequence_query at > /Users/chrisfisher/.julia/PyCall/src/conversions.jl:743 > in pytype_query at /Users/chrisfisher/.julia/PyCall/src/conversions.jl:759 > in convert at /Users/chrisfisher/.julia/PyCall/src/conversions.jl:808 > in pycall at /Users/chrisfisher/.julia/PyCall/src/PyCall.jl:812 > in fn at /Users/chrisfisher/.julia/PyCall/src/conversions.jl:181 > in close_queued_figs at /Users/chrisfisher/.julia/PyPlot/src/PyPlot.jl:295 > > sims is a 3 dimensional array with the following properties: > > Object of type "Chains" > > Iterations = 1:2000 > Thinning interval = 1 > Chains = 1,2,3,4 > Samples per chain = 2000 > > 2000x5x4 Array{Float64,3}: > > > Any advice would be greatly appreciated. I can also attach the full code I > was using if that is helpful. Thanks in advance.