Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How can I give a 3D dimension of a layer with Python?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 272
    Answer it

    I need your help with a problem regarding the 3d plot. I have created a layer T2 with the below code, and what I what it to do is to give this layer a volume with a third dimension. That means to be raised it, let's say 2 or 3 units, and from an original layer to create a voxel. Is it possible to change something to my code to do something like that?


    import numpy as np
    import matplotlib.pyplot as plt
    from mpl_toolkits.mplot3d import axes3d
    def f2(x2, y2):
        return np.sqrt(x2**2+y2**2)
    x2 = np.arange(7)
    y2 = np.arange(10)
    X2, Y2 = np.meshgrid(x2, y2)
    T2 = f2(X2, Y2)
               origin='lower', aspect='auto',
               extent=[0, 10, 0, 10],
    cb = plt.colorbar()

 0 Answer(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: