tdmackey / iozone-results-comparator

Automatically exported from code.google.com/p/iozone-results-comparator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracebacks (matplotlib version mismatch?)

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. clone the git repository (on Ubuntu 12.04)
2. run the script as of exaplained on the wiki

What is the expected output? What do you see instead?

The script fails with the following traceback:

Traceback (most recent call last):
  File "/home/david/hg/public/iozone-results-comparator/src/iozone_results_comparator.py", line 132, in <module>
    comparator.compare()
  File "/home/david/hg/public/iozone-results-comparator/src/iozone_results_comparator.py", line 98, in compare
    self.html.normal_mode()
  File "/home/david/hg/public/iozone-results-comparator/src/html.py", line 128, in normal_mode
    self.norm_operation(op)            
  File "/home/david/hg/public/iozone-results-comparator/src/html.py", line 142, in norm_operation
    self.norm_percentual(Op)
  File "/home/david/hg/public/iozone-results-comparator/src/html.py", line 267, in norm_percentual
    self.plotter.percentual_plot(Op, self.fs)
  File "/home/david/hg/public/iozone-results-comparator/src/plotter.py", line 176, in percentual_plot
    plt.scatter(baseX, baseY, baseDia, colorsSlower[catNr], label='Slower in Set1 ' + name)
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2557, in scatter
    ret = ax.scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, faceted, verts, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 5876, in scatter
    self.add_collection(collection)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 1445, in add_collection
    self.update_datalim(collection.get_datalim(self.transData))
  File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 160, in get_datalim
    offsets = transOffset.transform_non_affine(offsets)
  File "/usr/lib/pymodules/python2.7/matplotlib/transforms.py", line 1922, in transform_non_affine
    self._a.transform(points))
  File "/usr/lib/pymodules/python2.7/matplotlib/transforms.py", line 1415, in transform
    return affine_transform(points, mtx)
ValueError: Invalid vertices array.


If I fix it by removing str calls:

-------------------------------- src/plotter.py --------------------------------
index 71b7ae0..d01e899 100644
@@ -157,12 +157,12 @@ class Plotter:
                 if (pcnt < categories[catNr]) or (pcnt >= categories[catNr + 1]): 
                     continue
                 if set1Avg > baseAvg:
-                    set1X.append(str(fs))
-                    set1Y.append(str(bs))
+                    set1X.append(fs)
+                    set1Y.append(bs)
                     set1Dia.append(10 * pcnt)
                 else:
-                    baseX.append(str(fs))
-                    baseY.append(str(bs))
+                    baseX.append(fs)
+                    baseY.append(bs)
                     baseDia.append(10 * pcnt)

             intLeft = str(categories[catNr])


It runs up to the next traceback:

Traceback (most recent call last):
  File "/home/david/hg/public/iozone-results-comparator/src/iozone_results_comparator.py", line 132, in <module>
    comparator.compare()
  File "/home/david/hg/public/iozone-results-comparator/src/iozone_results_comparator.py", line 98, in compare
    self.html.normal_mode()
  File "/home/david/hg/public/iozone-results-comparator/src/html.py", line 128, in normal_mode
    self.norm_operation(op)            
  File "/home/david/hg/public/iozone-results-comparator/src/html.py", line 142, in norm_operation
    self.norm_percentual(Op)
  File "/home/david/hg/public/iozone-results-comparator/src/html.py", line 267, in norm_percentual
    self.plotter.percentual_plot(Op, self.fs)
  File "/home/david/hg/public/iozone-results-comparator/src/plotter.py", line 185, in percentual_plot
    plt.legend(loc = 'upper left', scatterpoints = 1, fontsize = 10)
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2800, in legend
    ret =  gca().legend(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 4519, in legend
    self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'fontsize'


It runs then fine if I remove this fontsize argument.


What version of the product are you using? On what operating system?


My system is an Ubuntu 12.04 (using matplotlib 1.1.1, but I've also tried 
with matplotlib 1.3)



Original issue reported on code.google.com by david.do...@gmail.com on 9 Sep 2013 at 10:38

Hello David,

thanks for reporting the issue. I was able to reproduce the issue on Ubuntu 
12.04 TLS with matplotlib 1.1.1. The problem is caused by the matplotlib 
version. I'm developing the tool using matplotlib 1.2.0 and it seems matplotlib 
1.1 does not support the legend for the scatter plot. I was able to get rid of 
the problem by updating to matplotlib with following steps.

# apt-get install python-pip libfreetype6-dev libpng12-devq
# pip install -U distribute
# pip install -U matplotlib

Please verify your matplotlib is actually in version 1.3. 
$ pip freeze | grep matplotlib
matplotlib==1.3.0

If you see a warning about number of opened figures in matplotlib 1.3, please 
update to the latest git version. If updating to 1.3 does not fix the issue for 
you, feel free to reopen this bug.

Petr

Original comment by petrbe...@gmail.com on 25 Sep 2013 at 2:00

  • Changed state: Done