Complex function defined programically
Code: "func_plot1.py". Programming language: Python DMelt Version 1.4. Last modified: 12/13/1970. License: Free
https://datamelt.org/code/cache/func_plot1_5332.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.lang.Math import *

def func(min,max):
   f=P1D("exp(sqrt(x))+log10(x*exp(x))")
   step=(max-min)/100.0 # define step 
   for i in range(100):
       x=min+step*i
       y=exp(sqrt(x))+log10(x*exp(x))  # get value of function
       if (x<3): y=1
       f.add(x,y)
   return f

c1 = HPlot()   # plot
c1.visible(); c1.setAutoRange()
p=func(1,10)   # plot between 1 and 100
p.setStyle('l')
p.setPenWidth(3)
c1.draw(p)