Ask Your Question

Revision history [back]

Can I directly plot a 2-dimensional subscheme?

Hello! I'm new to SAGE. I came over because it seemed a good way to plot 2-dimensional varieties, then I discovered the SAGE system for schemes and fell in love with it immediately. So I thought, why not try it out, define the 2-dimensional varieties as schemes and then plot them. But I didn't see any distinct plotting tools for schemes in the documentation, so I just tried to define a scheme V, then use implicit_plot3d(V) for plotting. However, if I don't add some coordinates, the compiler complains that I didn't provide any range arguments, and when I add coordinates, for instance if I define

V = A3.subscheme([x^2+y^2+z^2-1]) implicit_plot3d(V, (x, -1, 1), (y, -1, 1), (z, -1, 1))

it tells me

/usr/lib/python3.10/site-packages/sage/repl/rich_output/display_manager.py:610: RichReprWarning: Exception in _rich_repr_ while displaying object: Coordinates [1, -1, -1] do not define a point on Closed subscheme of Affine Space of dimension 3 over Rational Field defined by: x^2 + y^2 + z^2 - 1 warnings.warn( Graphics3d Object

So it even recognizes that the thing it should plot is a closed subscheme, but it doesn't understand that not all points in the range of the plot have to be in the subscheme. So my general question is: is there a way to plot suitable 2-dimensional schemes directly?