← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2633: 1. set color_cycle in matplotlib only when it is supported (fixes test failure)

 

------------------------------------------------------------
revno: 2633
committer: Václav Šmilauer <eu@xxxxxxxx>
branch nick: yade
timestamp: Sun 2011-01-02 11:43:22 +0100
message:
  1. set color_cycle in matplotlib only when it is supported (fixes test failure)
modified:
  py/plot.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'py/plot.py'
--- py/plot.py	2011-01-02 10:12:16 +0000
+++ py/plot.py	2011-01-02 10:43:22 +0000
@@ -195,7 +195,7 @@
 				line,=pylab.plot([nan],[nan])
 				currLineRefs.append(LineRef(line,None,[nan],[nan]))
 			# set different color series for y1 and y2 so that they are recognizable
-			pylab.rcParams['axes.color_cycle']='b,g,r,c,m,y,k' if not isY1 else 'm,y,k,b,g,r,c'
+			if pylab.rcParams.has_key('axes.color_cycle'): pylab.rcParams['axes.color_cycle']='b,g,r,c,m,y,k' if not isY1 else 'm,y,k,b,g,r,c'
 			for d in ySpecs2:
 				yNames.add(d)
 				line,=pylab.plot(data[pStrip],data[d[0]],d[1],label=xlateLabel(d[0]))