Boa noite, estou tendo o seguinte erro ao tentar criar o word cloud... Código...
cloud = WordCloud().generate(palavras)
plt.plot(cloud)
Erro...
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-70-5d07e464ce0e> in <module>
----> 1 cloud = WordCloud().generate(palavras)
2 plt.plot(cloud)
~\Anaconda3\lib\site-packages\wordcloud\wordcloud.py in __init__(self, font_path, width, height, margin, ranks_only, prefer_horizontal, mask, scale, color_func, max_words, min_font_size, stopwords, random_state, background_color, max_font_size, font_step, mode, relative_scaling, regexp, collocations, colormap, normalize_plurals, contour_width, contour_color, repeat, include_numbers, min_word_length, collocation_threshold)
333 self.contour_width = contour_width
334 self.scale = scale
--> 335 self.color_func = color_func or colormap_color_func(colormap)
336 self.max_words = max_words
337 self.stopwords = stopwords if stopwords is not None else STOPWORDS
~\Anaconda3\lib\site-packages\wordcloud\wordcloud.py in __init__(self, colormap)
103 """
104 def __init__(self, colormap):
--> 105 import matplotlib.pyplot as plt
106 self.colormap = plt.cm.get_cmap(colormap)
107
~\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>
34 from cycler import cycler
35 import matplotlib
---> 36 import matplotlib.colorbar
37 import matplotlib.image
38 from matplotlib import rcsetup, style
~\Anaconda3\lib\site-packages\matplotlib\colorbar.py in <module>
42 import matplotlib.collections as collections
43 import matplotlib.colors as colors
---> 44 import matplotlib.contour as contour
45 import matplotlib.cm as cm
46 import matplotlib.gridspec as gridspec
~\Anaconda3\lib\site-packages\matplotlib\contour.py in <module>
23
24 # Import needed for adding manual selection capability to clabel
---> 25 from matplotlib.blocking_input import BlockingContourLabeler
26
27 # We can't use a single line collection for contour because a line
~\Anaconda3\lib\site-packages\matplotlib\blocking_input.py in <module>
24
25 from matplotlib import cbook
---> 26 from matplotlib.backend_bases import MouseButton
27 import matplotlib.lines as mlines
28
~\Anaconda3\lib\site-packages\matplotlib\backend_bases.py in <module>
47 transforms, widgets, get_backend, is_interactive, rcParams)
48 from matplotlib._pylab_helpers import Gcf
---> 49 from matplotlib.backend_managers import ToolManager
50 from matplotlib.transforms import Affine2D
51 from matplotlib.path import Path
~\Anaconda3\lib\site-packages\matplotlib\backend_managers.py in <module>
37
38
---> 39 class ToolManager:
40 """
41 Manager for actions triggered by user interactions (key press, toolbar
~\Anaconda3\lib\site-packages\matplotlib\backend_managers.py in ToolManager()
184 del self._keys[k]
185
--> 186 @cbook._delete_parameter("3.3", "args")
187 def update_keymap(self, name, key, *args):
188 """
~\Anaconda3\lib\site-packages\matplotlib\cbook\deprecation.py in _delete_parameter(since, name, func)
354 @_delete_parameter("3.1", "unused")
355 def func(used_arg, other_arg, unused, more_args): ...
--> 356 """
357
358 if func is None:
~\Anaconda3\lib\site-packages\matplotlib\cbook\deprecation.py in <listcomp>(.0)
354 @_delete_parameter("3.1", "unused")
355 def func(used_arg, other_arg, unused, more_args): ...
--> 356 """
357
358 if func is None:
~\Anaconda3\lib\inspect.py in replace(self, name, kind, annotation, default)
2547 default = self._default
2548
-> 2549 return type(self)(name, kind, default=default, annotation=annotation)
2550
2551 def __str__(self):
~\Anaconda3\lib\inspect.py in __init__(self, name, kind, default, annotation)
2474 msg = '{} parameters cannot have default values'
2475 msg = msg.format(_get_paramkind_descr(self._kind))
-> 2476 raise ValueError(msg)
2477 self._default = default
2478 self._annotation = annotation
ValueError: variadic positional parameters cannot have default values
PS: Todo o restante do do código está funcionando conforme as aulas.