def plotOnTwoScales(ax, arrX, arrY1, arrY2, label1, label2, col1, col2,
        linewidth = 1, arrX2 = None):
	"""
	plot two time-series with two different y-axis scales (with two different
	colors), one scale on the left and the other on the right side of the graph
	@param ax: the graph canvas
	@param arrX: the shared x-axis data (typically a time-series)
	@param arrY1: the y-axis data for the first graph
	@param arrY2: the y-axis data for the second graph
	@param label1: the label for the first graph
	@param label2: the label for the second graph
	@param col1: the color for the first graph
	@param col2: the color for the second graph
	@param linewidth: the linewidth for plotting
	@param arrX2: if a second x-axis data array is specified, this is being
		used for plotting the 2nd data series (if None, we'll use the common
		x-axis data array, specified by parameter arrX)
	@return: the twin-ax
	"""
	ax.plot(arrX, arrY1, color=col1, linewidth=linewidth)
	ax.set_ylabel(label1, color=col1)
	ax.tick_params('y', colors=col1)
	ax2 = ax.twinx()
	if arrX2 is None:
		arrX2 = arrX
	ax2.plot(arrX2, arrY2, color=col2, linewidth=linewidth)
	ax2.set_ylabel(label2, color=col2)
	ax2.tick_params('y', colors=col2)
	return ax2