Complex function defined programically
Source code name: "func_plot1.py"
Programming language: Python
Topic: Function/Non-parametric
DMelt Version 1.4. Last modified: 12/13/1970. License: Free
https://datamelt.org/code/cache/func_plot1_260.py
To run this script using the DataMelt 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)