aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/Plot.py
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2019-03-08 10:41:40 +0300
committerBonfaceKilz2020-08-08 03:26:09 +0300
commit6e1102e36737a3f48a74cf431819c269c54f2601 (patch)
treebb889457103dd67c8bc5005cf14c9297a61ea70e /wqflask/utility/Plot.py
parentdcd053e0249b14c938d94eb749a8b4095c80be29 (diff)
downloadgenenetwork2-6e1102e36737a3f48a74cf431819c269c54f2601.tar.gz
Use draw_rotated_text()
Use the new draw_rotated_text() function to draw the text rotated as was formerly done. * wqflask/utility/Plot.py (plotBar): Use draw_rotated_text(). * wqflask/wqflask/marker_regression/display_mapping_results.py: (DisplayMappingResults) Use draw_rotated_text().
Diffstat (limited to 'wqflask/utility/Plot.py')
-rw-r--r--wqflask/utility/Plot.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/wqflask/utility/Plot.py b/wqflask/utility/Plot.py
index e7115036..d4373412 100644
--- a/wqflask/utility/Plot.py
+++ b/wqflask/utility/Plot.py
@@ -38,7 +38,7 @@ from numarray import ones, array, dot, swapaxes
import webqtlUtil
import corestats
from base import webqtlConfig
-
+from utility.pillow_utils import draw_rotated_text
import utility.logger
logger = utility.logger.getLogger(__name__ )
@@ -219,12 +219,12 @@ def plotBar(canvas, data, barColor=BLUE, axesColor=BLACK, labelColor=BLACK, XLab
font=labelFont,fill=labelColor)
if YLabel:
- im_drawer.text(
- text=YLabel,
- xy=(19,
- yTopOffset+plotHeight-(plotHeight-im_drawer.textsize(
- YLabel,font=labelFont)[0])/2.0),
- font=labelFont,fill=labelColor,angle=90)
+ draw_rotated_text(canvas, text=YLabel,
+ xy=(19,
+ yTopOffset+plotHeight-(
+ plotHeight-im_drawer.textsize(
+ YLabel,font=labelFont)[0])/2.0),
+ font=labelFont, fill=labelColor, angle=90)
labelFont=ImageFont.truetype(font=VERDANA_FILE,size=16)
if title: