from org.jfree.chart.plot import ValueMarker,XYPlot
from org.jfree.ui import RectangleAnchor,TextAnchor
from java.awt import Color, BasicStroke


def newMarker(y, labelText, colorStr):
	marker = ValueMarker(y)
	marker.setPaint(Color.decode(colorStr))
	marker.setLabel(labelText)
	marker.setLabelTextAnchor(TextAnchor.CENTER_LEFT)
	marker.setStroke(BasicStroke(2.5))
	
	return marker