ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 28 Oct 2018 17:25:23 -0500What is meant by "graphics primitive" in the sage documentation?https://ask.sagemath.org/question/44100/what-is-meant-by-graphics-primitive-in-the-sage-documentation/ I'm currently learning sage, and I keep seeing the phrase, "graphics primitive" mentioned in the manual, but I'm not quite sure what is meant by that. The closest thing I've found to a definition of it is on the page "Plotting Primitives" where it is defined as "things that know how to draw themselves in 2D". Does this just mean that a primitive is anything predefined by sage, like circles and lines? Also, are there only "graphics primitives" and not any other kind?Sat, 27 Oct 2018 18:35:38 -0500https://ask.sagemath.org/question/44100/what-is-meant-by-graphics-primitive-in-the-sage-documentation/Answer by slelievre for <p>I'm currently learning sage, and I keep seeing the phrase, "graphics primitive" mentioned in the manual, but I'm not quite sure what is meant by that. The closest thing I've found to a definition of it is on the page "Plotting Primitives" where it is defined as "things that know how to draw themselves in 2D". Does this just mean that a primitive is anything predefined by sage, like circles and lines? Also, are there only "graphics primitives" and not any other kind?</p>
https://ask.sagemath.org/question/44100/what-is-meant-by-graphics-primitive-in-the-sage-documentation/?answer=44106#post-id-44106In a sense, a graphics primitive is a component of a graphics object.
One way of creating a graphics object is to add several pre-existing ones.
In that case, you get a graphics object consisting of several graphics primitive.
Here is an example.
sage: a = plot(lambda x: 1)
sage: b = plot(lambda x: x)
sage: c = plot(lambda x: x^2)
sage: for g in (a, b, c, a + b, a + b + c):
....: print g
....:
Graphics object consisting of 1 graphics primitive
Graphics object consisting of 1 graphics primitive
Graphics object consisting of 1 graphics primitive
Graphics object consisting of 2 graphics primitives
Graphics object consisting of 3 graphics primitives
Sun, 28 Oct 2018 17:25:23 -0500https://ask.sagemath.org/question/44100/what-is-meant-by-graphics-primitive-in-the-sage-documentation/?answer=44106#post-id-44106