← Back to team overview

yade-users team mailing list archive

Re: [Question #703685]: Plot.plot() not working

 

Question #703685 on Yade changed:
https://answers.launchpad.net/yade/+question/703685

    Status: Needs information => Open

Namzu gave more information on the question:
This is the error I am getting.


AttributeError                            Traceback (most recent call last)
/usr/bin/yade in <module>
--> plot.plot()
/usr/lib/x86_64-linux-gnu/yade/py/yade/plot.py in plot(noShow, subPlots)
    598         .. note:: For backwards compatibility reasons, *noShow* option will return list of figures for multiple figures but a single figure (rather than list with 1 element) if there is only 1 figure.
    599 	"""
--> 600         createPlots(subPlots=subPlots)
    601         global currLineRefs
    602         figs=set([l.line.axes.get_figure() for l in currLineRefs])

/usr/lib/x86_64-linux-gnu/yade/py/yade/plot.py in createPlots(subPlots, scatterSize, wider)
    460                         if yNameFuncs:
    461                                 axes.yadeYNames,axes.yadeYFuncs,axes.yadeXName,axes.yadeLabelLoc=yNames,yNameFuncs,pStrip,labelLoc # prepend yade to avoid clashes
--> 462                 createLines(pStrip,plots_p_y1,isY1=True,y2Exists=len(plots_p_y2)>0)
    463                 if axesWd>0:
    464                         pylab.axhline(linewidth=axesWd,color='k')

/usr/lib/x86_64-linux-gnu/yade/py/yade/plot.py in createLines(pStrip, ySpecs, isY1, y2Exists)
    442                                 scatterPt=[0,0] if len(data[pStrip])==0 else (data[pStrip][current],data[d[0]][current])
    443                                 # if current value is NaN, use zero instead
--> 444                                 scatter=pylab.scatter(scatterPt[0] if not math.isnan(scatterPt[0]) else 0,scatterPt[1] if not math.isnan(scatterPt[1]) else 0,s=scatterSize,color=line.get_color(),**scatterMarkerKw)
    445                                 currLineRefs.append(LineRef(line,scatter,line2,data[pStrip],data[d[0]]))
    446                         axes=line.axes

~/.local/lib/python3.8/site-packages/matplotlib/pyplot.py in scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, edgecolors, plotnonfinite, data, **kwargs)
   2776         vmin=None, vmax=None, alpha=None, linewidths=None, *,
   2777         edgecolors=None, plotnonfinite=False, data=None, **kwargs):
-> 2778     __ret = gca().scatter(
   2779         x, y, s=s, c=c, marker=marker, cmap=cmap, norm=norm,
   2780         vmin=vmin, vmax=vmax, alpha=alpha, linewidths=linewidths,

~/.local/lib/python3.8/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs)
   1421     def inner(ax, *args, data=None, **kwargs):
   1422         if data is None:
-> 1423             return func(ax, *map(sanitize_sequence, args), **kwargs)
   1424 
   1425         bound = new_sig.bind(ax, *args, **kwargs)

~/.local/lib/python3.8/site-packages/matplotlib/axes/_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, edgecolors, plotnonfinite, **kwargs)
   4624                     "No data for colormapping provided via 'c'. "
   4625                     f"Parameters {keys_str} will be ignored")
-> 4626         collection._internal_update(kwargs)
   4627 
   4628         # Classic mode only:

~/.local/lib/python3.8/site-packages/matplotlib/artist.py in _internal_update(self, kwargs)
   1184         The lack of prenormalization is to maintain backcompatibility.
   1185         """
-> 1186         return self._update_props(
   1187             kwargs, "{cls.__name__}.set() got an unexpected keyword argument "
   1188             "{prop_name!r}")

~/.local/lib/python3.8/site-packages/matplotlib/artist.py in _update_props(self, props, errfmt)
   1158                     func = getattr(self, f"set_{k}", None)
   1159                     if not callable(func):
-> 1160                         raise AttributeError(
   1161                             errfmt.format(cls=type(self), prop_name=k))
   1162                     ret.append(func(v))

AttributeError: PathCollection.set() got an unexpected keyword argument
'verts'

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.