ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 04 Oct 2023 17:26:02 +0200Plotting a 3d graph and a 2d contour map on the same plothttps://ask.sagemath.org/question/73755/plotting-a-3d-graph-and-a-2d-contour-map-on-the-same-plot/Is it possible to plot a 3d graph and a 2d contour map on the same plot?
Thank you!
TatiWed, 04 Oct 2023 17:26:02 +0200https://ask.sagemath.org/question/73755/Contour Plot of 1/(2*pi*sqrt(x^2 + y^2)), why is it square? How to fix it?https://ask.sagemath.org/question/61288/contour-plot-of-12pisqrtx2-y2-why-is-it-square-how-to-fix-it/I plotted the contour plot of a function `1/(2*pi*sqrt(x^2 + y^2))`.
The code is below:
contour_plot(1/2/(pi*sqrt(x^2 + y^2)), (x, -0.1, 0.1), (y, -0.1, 0.1),
plot_points=20, colorbar=True)
**The output result is not round, but square! Why?**
**How to fix it?**Tube777tubeSat, 26 Feb 2022 15:44:14 +0100https://ask.sagemath.org/question/61288/built in method norm of Vector_symbolic_dense objecthttps://ask.sagemath.org/question/25835/built-in-method-norm-of-vector_symbolic_dense-object/ So, I want to write a program that plots equipotential contours for z=0 for electric potential of 3 charges(ch) at specified coordinates(matrix m). I need rv to be a vector with general coordinates so I can later plot the equipotential contours.
var(' x y ')
m=matrix(QQ,[[1,1],[-1,-1],[-1,1]])
ch=([-1,1,1])
rv=vector([x,y])
k=m.nrows();
u=[(rv-m[i]).norm() for i in range(k)];
However, after the last line I get this:
[<built in method norm of Vector_symbolic_dense object at 0xbb752fc>, <built in method norm of Vector_symbolic_dense object at 0xbb7532c>, <built in method norm of Vector_symbolic_dense object at 0xbb750bc>]
How do I fix this to get the norm of rv-m[i]?
,idoneaSun, 15 Feb 2015 22:22:21 +0100https://ask.sagemath.org/question/25835/