![]() Below, I’ve plotted the phase (actually the sine of the phase, to make it continuous) of a Jacobi theta function θ 3(1+4j/3,q) (restricted to |q| < 0.8, because it gets extremely messy for larger |q|): Since the pure wireframe plot is much faster, I think I prefer it for now.įor complex functions, it’d also be nice with a color function separate from the geometry function - then you could plot the phase as color in the same picture.Ĭolor helps for visualizing complicated structure, especially for phase plots. This doesn’t seem possible with matplotlib because the surface plot doesn’t do smoothing (even with a stride selected) overlaying a wireframe works decently, but the wireframe doesn’t render with occlusion and this looks bad for some functions. I’d like to be able to do a surface plot with a widely spaced wireframe mesh to pronounce the geometry, and smooth colored surface between the meshes. Using the Riemann zeta function again, a surface plot looks as follows: Riemann zeta function in the critical strip: ![]() Imaginary part of Lambert W function, 0th branch: Principal-branch logarithmic gamma function: Until I’ve figured out the details, I’ll share a couple of test plots.Ĭoulomb wave function of a complex argument, F(6,4,z): There will probably be a 3D plot function in a future version of mpmath (or two functions for two-variable real, and complex functions), similar in style to the existing matplotlib wrappers plot and cplot. A big advantage of 3D plots over 2D color plots is that far fewer evaluation points are required for a good high-resolution image, and this helps when visualizing the slower functions in mpmath. These plots are informative, but sometimes a 3D plot (typically of the function’s absolute value) gives a much better view. I’ve shown a lot of color plots of complex functions on this blog to demonstrate complex functions in mpmath. Hooray! matplotlib 0.99 is out and it has 3D plotting, finally! blog / 3D visualization of complex functions with matplotlib
0 Comments
Leave a Reply. |