Example of JPlot2D usage (II) with custom titles.
Code: "jplot2d_autopack.py". Programming language: Python DMelt Version 1. Last modified: 08/29/2015. License: Pro
https://datamelt.org/code/cache/jplot2d_autopack_7468.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



from org.jplot2d.element import *
from org.jplot2d.util  import *
from jhplot import *
from array import *
from java.awt import *

c1=HPlotXY(False)
c1.visible()
ef=c1.getFactory()
plot=c1.getPlot()
title=ef.createTitle("Custom Title")
title.setFontScale(2)
plot.addTitle(title)

subtitle = ef.createTitle("Custom Subtitle")
subtitle.setFontScale(1.2)
plot.addTitle(subtitle)
copyRight = ef.createTitle('\u00A9 2012 jplot2d project (LGPL)'.decode('unicode-escape'))
copyRight.setFontScale(1)
copyRight.setColor(Color.BLUE.darker());
copyRight.setPosition(TitlePosition.BOTTOMRIGHT);
plot.addTitle(copyRight);

xaxis = ef.createAxis();
yaxis = ef.createAxis();
xaxis.getTitle().setText("x axis");
plot.addXAxis(xaxis);
yaxis.getTitle().setText("y axis");
plot.addYAxis(yaxis);

You see the box below because you did not login.