HPlot shows verious axes styles
Source code name: "canvas2D_hplot_axes.py"
Programming language: Python
Topic: Plots/2D
DMelt Version 1. Last modified: 05/09/2015. License: Pro
https://datamelt.org/code/cache/canvas2D_hplot_axes_6640.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 java.awt import Font,Color
from jhplot  import  *


c1 = HPlot("Canvas",800,550,3,3)
c1.setGTitle("Axes tests")
c1.visible();
#  no grid
c1.setGridAll(0,0)
c1.setGridAll(1,0)

#  only Y axis
c1.cd(1,1)
c1.setRange(0,1,0,1)
c1.removeAxes()
c1.setAxisY()
c1.setNameY("some text: #bar{ω}")
c1.update()


# only Y axis as arrow type 1
c1.cd(1,2);
c1.setRange(0,1,0,1)
c1.removeAxes()
c1.setAxisY()
c1.setAxisArrow(1)
c1.update()


# only Y axis as arrow type 2
c1.cd(1,3)
c1.setRange(0,1,0,1)
c1.removeAxes()
c1.setAxisX()
c1.setAxisArrow(2)
c1.setNameX("time (μ)")
c1.update()

# no axes 
c1.cd(2,1)
c1.setRange(10,10,20,20)
c1.removeAxes()
c1.setNameX("removed X")
c1.setNameY("removed Y")
c1.update()



# show only X
c1.cd(2,2)
c1.setRange(0,1,0,1)
c1.removeAxes()
c1.setAxisX()
c1.update()


# show only X
c1.cd(2,3)
c1.setRange(0,1,0,1)
c1.removeAxes()
c1.setPenWidthAxis(5)
c1.setAxisX()
c1.update()


c1.cd(3,1)
c1.setRange(0,1,0,1)
c1.removeAxes()
c1.setAxisX()
c1.setAxisPenTicWidth(4)
c1.update()



c1.cd(3,2)
c1.setRange(-20,20,0,20)
c1.setAxisMirror(0,1)
c1.setAxisMirror(1,1)
c1.setGrid(0,1)
c1.setGrid(1,1)
c1.setAxesColor(Color.red)
c1.update();


c1.cd(3,3)
c1.setRange(0,1,0,1)
c1.setTicLabels(0,0)
c1.setTicLabels(1,0)
c1.setNameX("X")
c1.setNameY("Y")
c1.update();


You see the box below because you did not login.