Especially this function plot example will benefit from such an "adaptive" approach:
<html>
<head>
<meta charset="utf-8">
<title>MathCell</title>
<link rel="stylesheet" type="text/css" href="style.css">
<style></style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/gh/paulmasson/math@1.2.2/build/math.js"></script>
<script src="https://cdn.jsdelivr.net/gh/paulmasson/mathcell@1.7.0/build/mathcell.js"></script>
<script src="https://cdn.jsdelivr.net/gh/mathjax/MathJax@2.7.5/MathJax.js?config=TeX-AMS_HTML"></script>
<div class="mathcell" style="width: 100%; height: 100%; padding: .25in .5in .5in .5in;">
<script>
var parent = document.scripts[ document.scripts.length - 1 ].parentNode;
var id = generateId();
parent.id = id;
MathCell( id, [ ] );
parent.update = function( id ) {
function z1(x) { return tan(x); }
var p1 = plot( z1, [0, (6.283185307179586)], { } );
var data = [ p1 ];
var config = { type: 'svg' , yMin: -200, yMax: 200 };
evaluate( id, data, config );
}
parent.update( id );
</script>
</div>
</body>
</html>
Can we get a more "adaptive" plot function?
See for example these discussions:
Especially this function plot example will benefit from such an "adaptive" approach: