-
Notifications
You must be signed in to change notification settings - Fork 4
Description
When plotting the dataset in test/datasets/3f_ids_header.csv with radviz there is an error:
pml:5> data = load("3f_ids_header.csv")
pml:6> plot_radviz(data)
ValueError Traceback (most recent call last)
/home/drusk/workspace_pml/PythonMachineLearning/shell/shell.py in ()
----> 1 plot_radviz(data)
/home/drusk/workspace_pml/PythonMachineLearning/pml/plotting.py in plot_radviz(dataset)
34 # contains class membership info.
35 # therefore need to pass in the dataset's merged data and labels
---> 36 radviz(dataset.get_data_frame(), dataset.get_labels().name)
37 plt.show()
/usr/local/lib/python2.7/dist-packages/pandas-0.9.0rc2-py2.7-linux-x86_64.egg/pandas/tools/plotting.pyc in radviz(frame, class_column, ax, *kwds)
209 color=random_color(class),
210 label=com.stringify(class), *_kwds)
--> 211 ax.legend()
212
213 ax.add_patch(patches.Circle((0.0, 0.0), radius=1.0, facecolor='none'))
/usr/lib/pymodules/python2.7/matplotlib/axes.pyc in legend(self, args, *kwargs)
4517
4518
-> 4519 self.legend = mlegend.Legend(self, handles, labels, **kwargs)
4520 return self.legend
4521
/usr/lib/pymodules/python2.7/matplotlib/legend.pyc in init(self, parent, handles, labels, loc, numpoints, markerscale, scatterpoints, scatteryoffsets, prop, pad, labelsep, handlelen, handletextsep, axespad, borderpad, labelspacing, handlelength, handleheight, handletextpad, borderaxespad, columnspacing, ncol, mode, fancybox, shadow, title, bbox_to_anchor, bbox_transform, frameon, handler_map)
363
364 # init with null renderer
--> 365 self._init_legend_box(handles, labels)
366
367 self._loc = loc
/usr/lib/pymodules/python2.7/matplotlib/legend.pyc in _init_legend_box(self, handles, labels)
625 #xdescent, ydescent, width, height,
626 fontsize,
--> 627 handlebox)
628 handle_list.append(handle)
629
/usr/lib/pymodules/python2.7/matplotlib/legend_handler.pyc in call(self, legend, orig_handle, fontsize, handlebox)
108 a_list = self.create_artists(legend, orig_handle,
109 xdescent, ydescent, width, height, fontsize,
--> 110 handlebox.get_transform())
111
112 # create_artists will return a list of artists.
/usr/lib/pymodules/python2.7/matplotlib/legend_handler.pyc in create_artists(self, legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)
350
351 sizes = self.get_sizes(legend, orig_handle, xdescent, ydescent,
--> 352 width, height, fontsize)
353
354 p = self.create_collection(orig_handle, sizes,
/usr/lib/pymodules/python2.7/matplotlib/legend_handler.pyc in get_sizes(self, legend, orig_handle, xdescent, ydescent, width, height, fontsize)
305 xdescent, ydescent, width, height, fontsize):
306 if self._sizes is None:
--> 307 size_max = max(orig_handle.get_sizes())_legend.markerscale__2
308 size_min = min(orig_handle.get_sizes())_legend.markerscale**2
309
ValueError: max() arg is an empty sequence