Skip to content

3D plotting with 'mpmath' shows blank matplotlib window #746

@AlkisPis

Description

@AlkisPis

I have tried to creat a 3D plot with 'mpmath' in two differemt places:

  1. 3D surface plots (https://mpmath.org/doc/current/plotting.html):
    import mpmath as mp
    r, R = 1, 2.5
    f = lambda u, v: [r*mp.cos(u), (R+r*mp.sin(u))*mp.cos(v), (R+r*mp.sin(u))*mp.sin(v)]
    pi = float(mp.pi); mp.splot(f, [0, 2*pi], [0, 2*pi]) # Nothing shown
  1. https://notebook.community/jdhp-docs/python_notebooks/nb_dev_python/python_mpmath_en
    import mpmath as mp
    r, R = 1, 2.5
    f = lambda u, v: [r*mp.cos(u), (R+r*mp.sin(u))*mp.cos(v), (R+r*mp.sin(u))*mp.sin(v)]
    mp.splot(f)  # Nothing shown
    pi = float(mp.pi); mp.splot(f, [0, 2*pi], [0, 2*pi])  # Same thing

No errors. Just nothing. Anyone know what's the deal here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions