vector field plot with 2 matrices quiverConcatenating two std::vectorsHow to find out if an item is present in a std::vector?Why is Java Vector (and Stack) class considered obsolete or deprecated?What is the easiest way to initialize a std::vector with hardcoded elements?Appending a vector to a vectorPlot two graphs in same plot in RHow to put the legend out of the plotSave plot to image file instead of displaying it using MatplotlibAlgorithm to slide vector across a vectorFinding rotation between vectors in Matlab, from matrices of x and y components

In How Many Ways Can We Partition a Set Into Smaller Subsets So The Sum of the Numbers In Each Subset Is Equal?

What is the word for interior with a circle

Why is python script running in background consuming 100 % CPU?

Does the Aboleth have expertise in history and perception?

Find the 3D region containing the origin bounded by given planes

Why aren't satellites disintegrated even though they orbit earth within earth's Roche Limits?

pwaS eht tirsf dna tasl setterl fo hace dorw

Hotel booking: Why is Agoda much cheaper than booking.com?

About sklearn.metrics.average_precision_score documentation

Vehemently against code formatting

Germany rejected my entry to Schengen countries

Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?

Why would Thor need to strike a building with lightning to attack enemies?

In Dutch history two people are referred to as "William III"; are there any more cases where this happens?

Would it be possible to set up a franchise in the ancient world?

Why favour the standard WP loop over iterating over (new WP_Query())->get_posts()?

Who is frowning in the sentence "Daisy looked at Tom frowning"?

Failing students when it might cause them economic ruin

Why does the U.S military use mercenaries?

Character had a different name in the past. Which name should I use in a flashback?

Could a chemically propelled craft travel directly between Earth and Mars spaceports?

Can a Warforged have a ranged weapon affixed to them like an armblade?

Why did Nick Fury not hesitate in blowing up the plane he thought was carrying a nuke?

Should I twist DC power and ground wires from a power supply?



vector field plot with 2 matrices quiver


Concatenating two std::vectorsHow to find out if an item is present in a std::vector?Why is Java Vector (and Stack) class considered obsolete or deprecated?What is the easiest way to initialize a std::vector with hardcoded elements?Appending a vector to a vectorPlot two graphs in same plot in RHow to put the legend out of the plotSave plot to image file instead of displaying it using MatplotlibAlgorithm to slide vector across a vectorFinding rotation between vectors in Matlab, from matrices of x and y components






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have 2 nxn matrices, 1 containing the x-component of the vector field and the other the y-component. Additionally I have 2 lists of each length n with the x, and y position respectively.
now I would like to create a grid with my x-y values from the lists as scale and the vector field consisting of the 2 matrices (the arrows should consist of the x,y position of each matrix) but it doesnt work. Im quite desperate already and hope Ill find help! thanks a lot!



plt.quiver(x,y,matrix1,matrix2)
plt.show()



, where x and y are lists of n and matrix 1 and matrix 2 are matrices of nxn










share|improve this question




























    0















    I have 2 nxn matrices, 1 containing the x-component of the vector field and the other the y-component. Additionally I have 2 lists of each length n with the x, and y position respectively.
    now I would like to create a grid with my x-y values from the lists as scale and the vector field consisting of the 2 matrices (the arrows should consist of the x,y position of each matrix) but it doesnt work. Im quite desperate already and hope Ill find help! thanks a lot!



    plt.quiver(x,y,matrix1,matrix2)
    plt.show()



    , where x and y are lists of n and matrix 1 and matrix 2 are matrices of nxn










    share|improve this question
























      0












      0








      0








      I have 2 nxn matrices, 1 containing the x-component of the vector field and the other the y-component. Additionally I have 2 lists of each length n with the x, and y position respectively.
      now I would like to create a grid with my x-y values from the lists as scale and the vector field consisting of the 2 matrices (the arrows should consist of the x,y position of each matrix) but it doesnt work. Im quite desperate already and hope Ill find help! thanks a lot!



      plt.quiver(x,y,matrix1,matrix2)
      plt.show()



      , where x and y are lists of n and matrix 1 and matrix 2 are matrices of nxn










      share|improve this question














      I have 2 nxn matrices, 1 containing the x-component of the vector field and the other the y-component. Additionally I have 2 lists of each length n with the x, and y position respectively.
      now I would like to create a grid with my x-y values from the lists as scale and the vector field consisting of the 2 matrices (the arrows should consist of the x,y position of each matrix) but it doesnt work. Im quite desperate already and hope Ill find help! thanks a lot!



      plt.quiver(x,y,matrix1,matrix2)
      plt.show()



      , where x and y are lists of n and matrix 1 and matrix 2 are matrices of nxn







      python vector plot 2d






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 at 18:29









      Richard EisensteinRichard Eisenstein

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This code correctly generates a quiver plot with data of the dimensions specified.



          import numpy as np
          import matplotlib.pyplot as plt

          # Generate data
          n = 10
          x = np.random.rand(n)
          y = np.random.rand(n)
          matrix1 = np.random.rand(n, n) - 0.5
          matrix2 = np.random.rand(n, n) - 0.5

          # Create quiver plot
          plt.figure()
          plt.quiver(x, y, matrix1, matrix2)
          plt.show()


          Quiver plot






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55317069%2fvector-field-plot-with-2-matrices-quiver%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This code correctly generates a quiver plot with data of the dimensions specified.



            import numpy as np
            import matplotlib.pyplot as plt

            # Generate data
            n = 10
            x = np.random.rand(n)
            y = np.random.rand(n)
            matrix1 = np.random.rand(n, n) - 0.5
            matrix2 = np.random.rand(n, n) - 0.5

            # Create quiver plot
            plt.figure()
            plt.quiver(x, y, matrix1, matrix2)
            plt.show()


            Quiver plot






            share|improve this answer



























              0














              This code correctly generates a quiver plot with data of the dimensions specified.



              import numpy as np
              import matplotlib.pyplot as plt

              # Generate data
              n = 10
              x = np.random.rand(n)
              y = np.random.rand(n)
              matrix1 = np.random.rand(n, n) - 0.5
              matrix2 = np.random.rand(n, n) - 0.5

              # Create quiver plot
              plt.figure()
              plt.quiver(x, y, matrix1, matrix2)
              plt.show()


              Quiver plot






              share|improve this answer

























                0












                0








                0







                This code correctly generates a quiver plot with data of the dimensions specified.



                import numpy as np
                import matplotlib.pyplot as plt

                # Generate data
                n = 10
                x = np.random.rand(n)
                y = np.random.rand(n)
                matrix1 = np.random.rand(n, n) - 0.5
                matrix2 = np.random.rand(n, n) - 0.5

                # Create quiver plot
                plt.figure()
                plt.quiver(x, y, matrix1, matrix2)
                plt.show()


                Quiver plot






                share|improve this answer













                This code correctly generates a quiver plot with data of the dimensions specified.



                import numpy as np
                import matplotlib.pyplot as plt

                # Generate data
                n = 10
                x = np.random.rand(n)
                y = np.random.rand(n)
                matrix1 = np.random.rand(n, n) - 0.5
                matrix2 = np.random.rand(n, n) - 0.5

                # Create quiver plot
                plt.figure()
                plt.quiver(x, y, matrix1, matrix2)
                plt.show()


                Quiver plot







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 23 at 18:42









                NathanielNathaniel

                2,210314




                2,210314





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55317069%2fvector-field-plot-with-2-matrices-quiver%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript