 |
2D function and HLabel in HPlot3D
Source code name: "canvas2D_contour3.py"
Programming language: Python
Topic: Plots/Contour
DMelt Version 1. Last modified: 05/09/2015. License: Pro
https://datamelt.org/code/cache/canvas2D_contour3_3838.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 jhplot import *
from java.awt import *
f1=F2D("x^2+sin(x)*y^2",-2,2,-2,2);
c1=HPlot2D("Canvas",600,700)
c1.visible()
c1.setName("2D function");
c1.setNameX("X variable")
c1.setNameY("Y variable")
c1.setStyle(2)
c1.draw(f1)
lab1=HLabel("ω test",0.7,0.55, "NDC")
lab1.setColor(Color.white)
c1.add(lab1,0.1)
lab2=HLabel("β test",0.5,-0.8, "USER")
c1.add(lab2,0.1)
# reduce font size for X
axis=c1.getAxis(0);
axis.setLabelHeightP(0.03)
c1.update()
You see the box below because you did not login.