tadd transparancy to shear-displacement plot legend - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit cb3b82201801026c1b6917e82d3169167d07683f
(DIR) parent 8dc9a7244241f9443212f55d765edabedbadbe52
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Sat, 31 Jan 2015 10:27:50 +0100
add transparancy to shear-displacement plot legend
Diffstat:
M python/sphere.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -23,7 +23,10 @@ numpy.seterr(all='warn', over='raise')
# Sphere version number. This field should correspond to the value in
# `../src/constants.h`.
-VERSION=2.1
+VERSION = 2.1
+
+# Transparency on plot legends
+legend_alpha = 0.5
class sim:
'''
t@@ -5997,7 +6000,8 @@ class sim:
#ax4.legend(loc='upper right')
lns = lns0+lns1+lns2+lns3+lns4+lns5
labs = [l.get_label() for l in lns]
- ax4.legend(lns, labs, loc='upper right')
+ ax4.legend(lns, labs, loc='upper right',
+ fancybox=True, framealpha=legend_alpha)
# aesthetics
ax3.set_xlabel('Time [s]')