1 | initial version |

The way you solved the equation is such that the solutions are symbolic expressions. It is hard to ask Sage to plot a symbolic expression (unless it represents a function, in which case it will plot its graph).

If the complex numbers are floating-point (e.g. elements of `CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(2)])
```

Now, regarding your concrete example, the solutions are given as symbolic expressions representing equalities:

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

So, what you want is to use their right hand side (`rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function. In short:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

2 | No.2 Revision |

The way you solved the equation is such that the solutions are symbolic expressions. It is hard to ask Sage to plot a symbolic expression (unless it represents a function, in which case it will plot its graph).

If the complex numbers are floating-point (e.g. elements of `CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(2)])
```

Now, regarding your concrete example, the solutions are given as symbolic expressions representing equalities:

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

So, what you want is to use their right hand side (`rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function. In short:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular octogon, you can have the x and y axes to have the same scale with:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

3 | No.3 Revision |

The way you solved the equation is such that the solutions are symbolic expressions. It is hard to ask Sage to plot a symbolic expression (unless it represents a function, in which case it will plot its graph).

If the complex numbers are floating-point (e.g. elements of `CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(2)])
```

Now, regarding your concrete example, the solutions are given as symbolic expressions representing equalities:

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

So, what you want is to use their right hand side ~~(~~(use the `rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function.

Also, you can notice that when you want to iterate over the elements of a list `L`

, you do not need to use the indexing of the elements, so, instead of typing:

```
for i in range(len(L)):
blah L[i]
```

You can do:

```
for l in L:
blah l
```

In ~~short:~~short, you just have to type:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular ~~octogon, ~~hexagon, you can have the x and y axes to have the same scale with:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

4 | No.4 Revision |

`CDF`

), then plotting the is easily, thanks to the `points`

function:

`sage: points([CDF(1+I), CDF(-I), `~~CDF(2)])
~~CDF(-2)])

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

So, what you want is to use their right hand side (use the `rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function.

Also, you can notice that when you want to iterate over the elements of a list `L`

, you do not need to use the indexing of the elements, so, instead of typing:

```
for i in range(len(L)):
blah L[i]
```

You can do:

```
for l in L:
blah l
```

In short, you just have to type:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular hexagon, you can have the x and y axes to have the same scale with:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

5 | No.5 Revision |

`CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(-2)])
```

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

So, what you want is to use their right hand side (use the `rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function.

Also, you can notice that when you want to iterate over the elements of a list `L`

, you do not need to use the indexing of the elements, so, instead of typing:

```
for i in range(len(L)):
blah L[i]
```

You can do:

```
for l in L:
blah l
```

In short, you just have to type:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular hexagon, you can have the x and y axes to have the same scale ~~with:~~with the `aspect_ratio`

option:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

6 | No.6 Revision |

`CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(-2)])
```

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

So, what you want is to use their right hand side (use the `rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function.

`L`

, you do not need to use the indexing of the elements, so, instead of typing:

```
for i in range(len(L)):
blah L[i]
```

You can do:

```
for l in L:
blah l
```

In short, you just have to type:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular hexagon, you can ~~have ~~require the x and y axes to have the same scale with the `aspect_ratio`

option:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

7 | No.7 Revision |

`CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(-2)])
```

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

`rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function.

`L`

, you do not need to use the indexing of the elements, so, instead of typing:

```
for i in range(len(L)):
blah L[i]
```

You can do:

```
for l in L:
blah l
```

In short, you just have to type:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular hexagon, you can require the x and y axes to have the same scale with the `aspect_ratio`

option:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

Note also that plots are Sage objects that can be added, e.g.

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1) + circle((0,0), CDF(8^(1/6)), color='red')
```

See: this Sage cell

8 | No.8 Revision |

`CDF`

), then plotting the is easily, thanks to the `points`

function:

```
sage: points([CDF(1+I), CDF(-I), CDF(-2)])
```

```
sage: solutions
[z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == 1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) - 1/2*sqrt(2)*(-1)^(1/6), z == -1/2*I*sqrt(3)*sqrt(2)*(-1)^(1/6) + 1/2*sqrt(2)*(-1)^(1/6), z == sqrt(2)*(-1)^(1/6)]
```

`rhs`

method) and turn them into elements of `CDF`

, so that you can plot them with the `points`

function.

`L`

, you do not need to use the indexing of the elements, so, instead of typing:

```
for i in range(len(L)):
blah L[i]
```

You can do:

```
for l in L:
blah l
```

In short, you just have to type:

```
sage: points([CDF(s.rhs()) for s in solutions])
```

If you want a regular hexagon, you can require the x and y axes to have the same scale with the `aspect_ratio`

option:

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1)
```

Note also that plots are Sage objects that can be ~~added, ~~added with eachother, e.g.

```
sage: points([CDF(s.rhs()) for s in solutions], aspect_ratio=1) + circle((0,0), CDF(8^(1/6)), color='red')
```

See: this Sage cell

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.