How to use NUMPY MESHGRID and Contour Plots in Python

Sdílet
Vložit
  • čas přidán 26. 10. 2023
  • This is for future Rhett (when he forgets how to do this). Here is a super quick tutorial on meshgrids and 3d plotting.
    If you need my other python cheat sheet, here it is.
    • These are the numpy py...

Komentáře • 12

  • @TJBEATSAMV
    @TJBEATSAMV Před měsícem +1

    Thanks, that was helpful !

  • @purpurwax9303
    @purpurwax9303 Před měsícem +1

    This was nice and simple, clearly explained the reasoning behind n+1 number of elements, showcased how the meshgrids look like. Could you do a similar idea but with vectorfields? Like electric field around a stationary charge... It is more difficult since each (x,y) coordinate is no longer a number that is part of a scalar field, instead its a vector part of a vector field.

    • @DotPhysics
      @DotPhysics  Před měsícem

      Yes, it's more difficult - here's an older video that might address your issue
      czcams.com/video/_Iub8f-RBJw/video.html

  • @dwaynep6174
    @dwaynep6174 Před 8 měsíci +8

    I import numpy as plt 🤣

    • @DotPhysics
      @DotPhysics  Před 8 měsíci +3

      I respect the choice (but it's crazy)

    • @dwaynep6174
      @dwaynep6174 Před 8 měsíci

      @@DotPhysicsI don’t actually but like you said it’s a funny joke

    • @arielgohoury2597
      @arielgohoury2597 Před 6 měsíci

      😂😂

  • @MudiJr-hd3dq
    @MudiJr-hd3dq Před dnem

    When I write plot.contour(X,Y,f)
    It say matplotlib.pyplot has no that attribute why?

    • @DotPhysics
      @DotPhysics  Před dnem

      Did you import matplotlib.pyplot as plt?

  • @godphysics2473
    @godphysics2473 Před 8 měsíci +1

    Excellent explanation so plain really!