CoCalc Public Filestmp / 2015-05-24-221132.sagewsOpen in with one click!
Authors: Harald Schilly, ℏal Snyder, William A. Stein
%var x y plot3d_using_matplotlib(x^2 + (1-y^2), (x, -5, 5), (y, -5, 5))
File: /projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/ Signature : plot3d_using_matplotlib(expr, rangeX, rangeY, density=40, elev=45.0, azim=35.0, alpha=0.85, cmap=None) Docstring : Plots a symbolic expression in two variables on a two dimensional grid and renders the function using matplotlib's 3D projection. The purpose is to make it possible to create vectorized images (PDF, SVG) for high-resolution images in publications -- instead of rasterized image formats. Example:: %var x y plot3d_using_matplotlib(x^2 + (1-y^2), (x, -5, 5), (y, -5, 5)) Arguments: * expr: symbolic expression, e.g. x^2 - (1-y)^2 * rangeX: triple: (variable, minimum, maximum), e.g. (x, -10, 10) * rangeY: like rangeX * density: grid density * elev: elevation, e.g. 45 * azim: azimuth, e.g. 35 * alpha: alpha transparency of plot (default: 0.85) * cmap: matplotlib colormap, e.g. (default)