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.