Draw 2d and 3d functions
<head> <!-- Include the CanvasXpress library in your HTML file --> <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/> <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script> </head> <body> <!-- Create a canvas element for the chart with the desired dimensions --> <div> <canvas id="canvasId" width="600" height="600"></canvas> </div> <!-- Create a script to initialize the chart --> <script> // Create the data for the graph var data = { "fx" : "5 * sin(sqrt(x*x+y*y)) / sqrt(x*x+y*y)" } // Create the configuration for the graph var config = { "graphType":"Scatter3D", "setMaxX":"5", "setMaxY":"5", "setMaxZ":"5", "setMinX":"-5", "setMinY":"-5", "setMinZ":"-5", "show3DGrid":false } // Call the CanvasXpress function to create the graph var cX = new CanvasXpress("canvasId", data, config); </script> </body>