When I make graphs with javascript, I usually parse external files like csv or txt. However, my next graph actually will not be using real world data, but rather simulated data. So for this, I need to hard code javascript's math representation of a curved line. Here is the line I need to formulate:
Question
How can I express a curved line's data points, as seen above, in javascript syntax? I'm not plotting the line, I'm just populating the x and y values for the line. Length of each array is 100.
lineDataX = [...];
lineDataY = [...];
Note: There are two distinct end points and they do not touch either axis. The curve is to "float" in the graph space, just as pictured.
Comments
Post a Comment