Source
pl.text(numtime[i]+Xtextoffset,Ytextoffset+mywinds[i],'-->',rotation=mywindd[i], alpha=1,color='purple',fontsize=12)
###############################################
## To plot stuff in weather tables, saved to MSname+.plotWX.png
## and estimate zenith opacity per spw, returned as a list named myTau
##
##
## J. Marvil 2.6.12
## revised 4.27.12 to add support for missing/empty weather table
## revised 11.05.12 to address CASA 4.0 changes
###############################################
from __future__ import absolute_import
# get is_CASA6 and is_python3
from casatasks.private.casa_transition import is_CASA6
if is_CASA6:
from casatools import atmosphere, table, ms, quanta, measures
from casatasks import casalog
else:
from taskinit import *
from casac import atmosphere, table, ms, quanta, measures
mytb = table( )
myms = ms( )
myqa = quanta( )
myme = measures( )
import pylab as pl
import numpy as np
from math import pi,floor
import os.path as osp
def _find(condition):
"""Returns indices where ravel(a) is true.
Private implementation of deprecated matplotlib.mlab.find
Thanks to: https://github.com/python-control/python-control/pull/262/files
"""
return np.nonzero(np.ravel(condition))[0]
###############
## hides the extreme Y-axis ticks, helps stack plots close together without labels overlaping
def jm_clip_Yticks():
xa=pl.gca()
nlabels=0
for label in xa.yaxis.get_ticklabels():
nlabels+=1
thislabel=0
if nlabels>3:
for label in xa.yaxis.get_ticklabels():
if thislabel==0: label.set_alpha(0)
if thislabel==nlabels-1: label.set_alpha(0)
thislabel+=1
##############
## sets the position of the y-axis label to the right side of the plot, can also move up/down
def jm_set_Ylabel_pos(pos=(0.5,0.5)):
ax=pl.gca();
ax.yaxis.set_label_position('right')
ax.yaxis.label.set_rotation(270)
ax.yaxis.label.set_position(pos)
###############