Visualizing grid map action arrow size












0















I've got this nested list. Each nested list represents a cell in a 4 by 4 grid. Each element in the nested list represents the strength or value of an action. In the nested list, the first element represents UP, second represents RIGHT, 3rd DOWN, 4th LEFT.



How can I create visualized grid in python where each grid CELL has every arrow but varies in SIZE depending on the value?



[
[0.0, 0.0, 0.0, 0.0],
[-1.89, -2.6109, -2.61, -1.0],
[-2.46, -3.43, -2.47, -1.9],
[-3.40, -3.14, -2.71, -2.71],
[-1.0, -2.70, -2.70, -1.88],
[-1.89, -2.47, -3.0, -1.89],
[-2.70, -2.70, -2.70, -2.70],
[-3.43, -2.68, -1.9, -3.34],
[-1.9, -3.34, -2.46, -2.46],
[-2.70, -2.70, -2.70, -2.70],
[-3.33, -1.9, -1.9, -3.40],
[-2.61, -1.89, -1.0, -1.719],
[-2.70, -2.70, -3.40, -3.14],
[-3.08, -1.9, -2.46, -2.38],
[-2.67, -1.0, -1.89, -2.70],
[0.0, 0.0, 0.0, 0.0]
]









share|improve this question























  • Hey! I am not that experienced in Matplotlib, but I wanted to give my view of this problem (that will probably help you solve this). You should start with creating a grid, of the required dimension (16x4, from the example). Then you iterate for each cell, add the required arrow, and scale it as per the value in the array. Like, for the first cell, you add a regular up arrow, and then scale it to 0. It may not be that efficient, but might do your work.

    – MaJoR
    Nov 25 '18 at 6:28











  • This sounds like a task, not a problem. Do you have problems finding how to plot arrows in matplotlib?

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:36











  • @ImportanceOfBeingErnest Im not even sure where to start looking to start this task.

    – Liondancer
    Nov 25 '18 at 13:37











  • To plot single arrows, annotation, for your case also consider quiver

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:44
















0















I've got this nested list. Each nested list represents a cell in a 4 by 4 grid. Each element in the nested list represents the strength or value of an action. In the nested list, the first element represents UP, second represents RIGHT, 3rd DOWN, 4th LEFT.



How can I create visualized grid in python where each grid CELL has every arrow but varies in SIZE depending on the value?



[
[0.0, 0.0, 0.0, 0.0],
[-1.89, -2.6109, -2.61, -1.0],
[-2.46, -3.43, -2.47, -1.9],
[-3.40, -3.14, -2.71, -2.71],
[-1.0, -2.70, -2.70, -1.88],
[-1.89, -2.47, -3.0, -1.89],
[-2.70, -2.70, -2.70, -2.70],
[-3.43, -2.68, -1.9, -3.34],
[-1.9, -3.34, -2.46, -2.46],
[-2.70, -2.70, -2.70, -2.70],
[-3.33, -1.9, -1.9, -3.40],
[-2.61, -1.89, -1.0, -1.719],
[-2.70, -2.70, -3.40, -3.14],
[-3.08, -1.9, -2.46, -2.38],
[-2.67, -1.0, -1.89, -2.70],
[0.0, 0.0, 0.0, 0.0]
]









share|improve this question























  • Hey! I am not that experienced in Matplotlib, but I wanted to give my view of this problem (that will probably help you solve this). You should start with creating a grid, of the required dimension (16x4, from the example). Then you iterate for each cell, add the required arrow, and scale it as per the value in the array. Like, for the first cell, you add a regular up arrow, and then scale it to 0. It may not be that efficient, but might do your work.

    – MaJoR
    Nov 25 '18 at 6:28











  • This sounds like a task, not a problem. Do you have problems finding how to plot arrows in matplotlib?

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:36











  • @ImportanceOfBeingErnest Im not even sure where to start looking to start this task.

    – Liondancer
    Nov 25 '18 at 13:37











  • To plot single arrows, annotation, for your case also consider quiver

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:44














0












0








0








I've got this nested list. Each nested list represents a cell in a 4 by 4 grid. Each element in the nested list represents the strength or value of an action. In the nested list, the first element represents UP, second represents RIGHT, 3rd DOWN, 4th LEFT.



How can I create visualized grid in python where each grid CELL has every arrow but varies in SIZE depending on the value?



[
[0.0, 0.0, 0.0, 0.0],
[-1.89, -2.6109, -2.61, -1.0],
[-2.46, -3.43, -2.47, -1.9],
[-3.40, -3.14, -2.71, -2.71],
[-1.0, -2.70, -2.70, -1.88],
[-1.89, -2.47, -3.0, -1.89],
[-2.70, -2.70, -2.70, -2.70],
[-3.43, -2.68, -1.9, -3.34],
[-1.9, -3.34, -2.46, -2.46],
[-2.70, -2.70, -2.70, -2.70],
[-3.33, -1.9, -1.9, -3.40],
[-2.61, -1.89, -1.0, -1.719],
[-2.70, -2.70, -3.40, -3.14],
[-3.08, -1.9, -2.46, -2.38],
[-2.67, -1.0, -1.89, -2.70],
[0.0, 0.0, 0.0, 0.0]
]









share|improve this question














I've got this nested list. Each nested list represents a cell in a 4 by 4 grid. Each element in the nested list represents the strength or value of an action. In the nested list, the first element represents UP, second represents RIGHT, 3rd DOWN, 4th LEFT.



How can I create visualized grid in python where each grid CELL has every arrow but varies in SIZE depending on the value?



[
[0.0, 0.0, 0.0, 0.0],
[-1.89, -2.6109, -2.61, -1.0],
[-2.46, -3.43, -2.47, -1.9],
[-3.40, -3.14, -2.71, -2.71],
[-1.0, -2.70, -2.70, -1.88],
[-1.89, -2.47, -3.0, -1.89],
[-2.70, -2.70, -2.70, -2.70],
[-3.43, -2.68, -1.9, -3.34],
[-1.9, -3.34, -2.46, -2.46],
[-2.70, -2.70, -2.70, -2.70],
[-3.33, -1.9, -1.9, -3.40],
[-2.61, -1.89, -1.0, -1.719],
[-2.70, -2.70, -3.40, -3.14],
[-3.08, -1.9, -2.46, -2.38],
[-2.67, -1.0, -1.89, -2.70],
[0.0, 0.0, 0.0, 0.0]
]






python matplotlib grid






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 6:20









LiondancerLiondancer

5,2542784166




5,2542784166













  • Hey! I am not that experienced in Matplotlib, but I wanted to give my view of this problem (that will probably help you solve this). You should start with creating a grid, of the required dimension (16x4, from the example). Then you iterate for each cell, add the required arrow, and scale it as per the value in the array. Like, for the first cell, you add a regular up arrow, and then scale it to 0. It may not be that efficient, but might do your work.

    – MaJoR
    Nov 25 '18 at 6:28











  • This sounds like a task, not a problem. Do you have problems finding how to plot arrows in matplotlib?

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:36











  • @ImportanceOfBeingErnest Im not even sure where to start looking to start this task.

    – Liondancer
    Nov 25 '18 at 13:37











  • To plot single arrows, annotation, for your case also consider quiver

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:44



















  • Hey! I am not that experienced in Matplotlib, but I wanted to give my view of this problem (that will probably help you solve this). You should start with creating a grid, of the required dimension (16x4, from the example). Then you iterate for each cell, add the required arrow, and scale it as per the value in the array. Like, for the first cell, you add a regular up arrow, and then scale it to 0. It may not be that efficient, but might do your work.

    – MaJoR
    Nov 25 '18 at 6:28











  • This sounds like a task, not a problem. Do you have problems finding how to plot arrows in matplotlib?

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:36











  • @ImportanceOfBeingErnest Im not even sure where to start looking to start this task.

    – Liondancer
    Nov 25 '18 at 13:37











  • To plot single arrows, annotation, for your case also consider quiver

    – ImportanceOfBeingErnest
    Nov 25 '18 at 13:44

















Hey! I am not that experienced in Matplotlib, but I wanted to give my view of this problem (that will probably help you solve this). You should start with creating a grid, of the required dimension (16x4, from the example). Then you iterate for each cell, add the required arrow, and scale it as per the value in the array. Like, for the first cell, you add a regular up arrow, and then scale it to 0. It may not be that efficient, but might do your work.

– MaJoR
Nov 25 '18 at 6:28





Hey! I am not that experienced in Matplotlib, but I wanted to give my view of this problem (that will probably help you solve this). You should start with creating a grid, of the required dimension (16x4, from the example). Then you iterate for each cell, add the required arrow, and scale it as per the value in the array. Like, for the first cell, you add a regular up arrow, and then scale it to 0. It may not be that efficient, but might do your work.

– MaJoR
Nov 25 '18 at 6:28













This sounds like a task, not a problem. Do you have problems finding how to plot arrows in matplotlib?

– ImportanceOfBeingErnest
Nov 25 '18 at 13:36





This sounds like a task, not a problem. Do you have problems finding how to plot arrows in matplotlib?

– ImportanceOfBeingErnest
Nov 25 '18 at 13:36













@ImportanceOfBeingErnest Im not even sure where to start looking to start this task.

– Liondancer
Nov 25 '18 at 13:37





@ImportanceOfBeingErnest Im not even sure where to start looking to start this task.

– Liondancer
Nov 25 '18 at 13:37













To plot single arrows, annotation, for your case also consider quiver

– ImportanceOfBeingErnest
Nov 25 '18 at 13:44





To plot single arrows, annotation, for your case also consider quiver

– ImportanceOfBeingErnest
Nov 25 '18 at 13:44












0






active

oldest

votes











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%2f53465158%2fvisualizing-grid-map-action-arrow-size%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f53465158%2fvisualizing-grid-map-action-arrow-size%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

To store a contact into the json file from server.js file using a class in NodeJS

Redirect URL with Chrome Remote Debugging Android Devices

Dieringhausen