Commit dfa583f2 by Steven Bird

tweaked processing of title parameter to FreqDist.plot, resolves issue 646

svn/trunk@8736
parent 70191abb
...@@ -322,9 +322,11 @@ class FreqDist(dict): ...@@ -322,9 +322,11 @@ class FreqDist(dict):
pylab.grid(True, color="silver") pylab.grid(True, color="silver")
if not "linewidth" in kwargs: if not "linewidth" in kwargs:
kwargs["linewidth"] = 2 kwargs["linewidth"] = 2
if "title" in kwargs:
pylab.title(kwargs["title"])
del kwargs["title"]
pylab.plot(freqs, **kwargs) pylab.plot(freqs, **kwargs)
pylab.xticks(range(len(samples)), [str(s) for s in samples], rotation=90) pylab.xticks(range(len(samples)), [str(s) for s in samples], rotation=90)
if "title" in kwargs: pylab.title(kwargs["title"])
pylab.xlabel("Samples") pylab.xlabel("Samples")
pylab.ylabel(ylabel) pylab.ylabel(ylabel)
pylab.show() pylab.show()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment