Skip to content

Commit 9f69189

Browse files
committed
fix variable overwriting in radviz
The variable `n` is set to number of rows in dataframe, and then it overwritten with number of columns, but after that there is loop that should iterate over rows and it uses new value in `n` that holds number of columns already.
1 parent 62529cc commit 9f69189

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/source/v0.15.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -920,3 +920,4 @@ Bug Fixes
920920
- Bug in plotting methods modifying the global matplotlib rcParams (:issue:`8242`).
921921
- Bug in ``DataFrame.__setitem__`` that caused errors when setting a dataframe column to a sparse array (:issue:`8131`)
922922
- Bug where ``Dataframe.boxplot()`` failed when entire column was empty (:issue:`8181`).
923+
- Bug with messed variables in ``radviz`` visualization (:issue:`8199`).

pandas/tools/plotting.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,10 @@ def normalize(series):
405405
for kls in classes:
406406
to_plot[kls] = [[], []]
407407

408-
n = len(frame.columns) - 1
408+
m = len(frame.columns) - 1
409409
s = np.array([(np.cos(t), np.sin(t))
410-
for t in [2.0 * np.pi * (i / float(n))
411-
for i in range(n)]])
410+
for t in [2.0 * np.pi * (i / float(m))
411+
for i in range(m)]])
412412

413413
for i in range(n):
414414
row = df.iloc[i].values

0 commit comments

Comments
 (0)