I did thought of that. The problem is to determine in advance the right pseudo-value to use in order not to squash the z values of interest and not to obscure the view of the surface(s) of interest (plot3d does not have, alas, xmin, ymin zmin, xmax, ymax, zmax parameters...).
Sincerely, -- Emmanuel Charpentier Le mercredi 9 décembre 2015 23:48:27 UTC+1, slelievre a écrit : > > > > 2015-12-05 21:03:04 UTC+1, Emmanuel Charpentier: >> >> Plot2d() gracefully handles plotting a fnction undefined (in real terms) >> on part of the plotting domain. For example : >> plot(sqrt(x^2-1),(x,-3/2,3.2)) >> displays two half-axes of hyperbole, and waons that some points have been >> lost. >> >> plot3d() seems to lack this facility : an undefined point causes the >> loss of al the plot. >> >> How would you handle this case ? I want to plot a function defined only >> for some part of the plotting domain. I do not have an analytic definition >> for the bounds of this domain (it is defined by an equation with no closed >> form solution, but easily approximated by find_root()). >> > > An illustration: > > sage: plot(lambda x: sqrt(x^2 - 1), (-2, 2)) > verbose 0 (2716: plot.py, generate_plot_points) WARNING: When plotting, > failed to evaluate function at 99 points. > verbose 0 (2716: plot.py, generate_plot_points) Last error message: 'math > domain error' > Launched png viewer for Graphics object consisting of 2 graphics > primitives > sage: plot3d(lambda x, y: sqrt(x^2 + y^2 - 1), (-2, 2), (-2, 2)) > /opt/sage69b1/local/lib/python2.7/site-packages/sage/repl/rich_output/ > display_manager.py:570: RichReprWarning: Exception in _rich_repr_ while > displaying object: math domain error > RichReprWarning, > Graphics3d Object > > > One workaround might be, if your function f sometimes > returns complex output, to plot f(x) when real, and 0 otherwise. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.