update plot

main
Francesco Minnocci 1 year ago
parent 41ff50ff51
commit 6048a480b4
Signed by untrusted user: BachoSeven
GPG Key ID: 2BE4AB7FDAD828A4

@ -9,7 +9,7 @@
- Projective coordinates - Projective coordinates
- Parallelization - Parallelization
- Endgames(?) - Extract functions in separate modules(?)
## Example system ## Example system
@ -20,6 +20,6 @@ xy - 1 &= 0 \\
\end{align*} \end{align*}
$$ $$
Plot of our approximate solutions: Plot of the approximate solutions:
![](solutions.png) ![](solutions.png)

@ -86,8 +86,8 @@ end
function plot_real(solutions, F) function plot_real(solutions, F)
p=plot(xlim = (-3, 3), ylim = (-3, 3), aspect_ratio = :equal) p=plot(xlim = (-3, 3), ylim = (-3, 3), aspect_ratio = :equal)
contour!(-3:0.1:3, -3:0.1:3, (x,y)->F[1](variables(F)=>[x,y]), levels=[0], color=:cyan) contour!(-3:0.1:3, -3:0.1:3, (x,y)->F[1](variables(F)=>[x,y]), levels=[0], cbar=false, color=:cyan)
contour!(-3:0.1:3, -3:0.1:3, (x,y)->F[2](variables(F)=>[x,y]), levels=[0], color=:green) contour!(-3:0.1:3, -3:0.1:3, (x,y)->F[2](variables(F)=>[x,y]), levels=[0], cbar=false, color=:green)
scatter!([real(sol[1]) for sol in solutions], [real(sol[2]) for sol in solutions], color = "red", label = "Solutions") scatter!([real(sol[1]) for sol in solutions], [real(sol[2]) for sol in solutions], color = "red", label = "Solutions")
png("solutions") png("solutions")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Loading…
Cancel
Save