Matplotlib: imshow gives values outside of extent (Bug?)Imshow: extent and aspectdisplaying 2D array for checking the values of the cellsmatplotlib imshow - default colour normalisationMatplotlib : display array values with imshowPython's Matplotlib: Override imshow extentUsing matplotlib *without* TCLUnpacking values in pythonIssue with xticklabels when saving a figure with matplotlibMatplotlib imshow checkerboard plot with changing data rangesCrop matplotlib imshow to extent of values

What causes the traces to wrinkle like this and should I be worried

Is it impolite to ask for an in-flight catalogue with no intention of buying?

Would there theoretically be an accompanying effect to something moving beyond the speed of light?

Where Does VDD+0.3V Input Limit Come From on IC chips?

Safely hang a mirror that does not have hooks

Are there any adverse impacts if I keep WiFi router on all time?

Do we know the situation in Britain before Sealion (summer 1940)?

A food item only made possible by time-freezing storage?

I reverse the source code, you negate the output!

Was there a trial by combat between a man and a dog in medieval France?

How do you use the interjection for snorting?

What's the story to "WotC gave up on fixing Polymorph"?

Norwegian refuses EU delay (4.7 hours) compensation because it turned out there was nothing wrong with the aircraft

What is this utensil for?

Is there a way to hide HTML source code yet keeping it effective?

Social leper versus social leopard

Type_traits *_v variable template utility order fails to compile

If the EU does not offer an extension to UK's Article 50 invocation, is the Benn Bill irrelevant?

What do you do if you have developments on your paper during the long peer review process?

1, 2, 4, 8, 16, ... 33?

How to make interviewee comfortable interviewing in lounge chairs

I reverse the source code, you negate the input!

Can an integer optimization problem be convex?

Is it possible to encode a message in such a way that can only be read by someone or something capable of seeing into the very near future?



Matplotlib: imshow gives values outside of extent (Bug?)


Imshow: extent and aspectdisplaying 2D array for checking the values of the cellsmatplotlib imshow - default colour normalisationMatplotlib : display array values with imshowPython's Matplotlib: Override imshow extentUsing matplotlib *without* TCLUnpacking values in pythonIssue with xticklabels when saving a figure with matplotlibMatplotlib imshow checkerboard plot with changing data rangesCrop matplotlib imshow to extent of values






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















With this code you can produce such an image:



import matplotlib.pyplot as plt
import numpy as np

axes = plt.subplot()
axes.set_aspect(1)
axes.format_coord = "x=:1.2f, y=:1.2f".format

pltRange = range(-1, 12)
axes.set_xlim(min(pltRange), max(pltRange))
axes.set_ylim(min(pltRange), max(pltRange))
axes.set_xticks(pltRange)
axes.set_yticks(pltRange)
plt.grid(True)

array = np.random.random((10, 10))
image = axes.imshow(array, extent=[0, 10, 0, 10], origin='lower')
image.format_cursor_data = " | Value: :8f".format

plt.show()


enter image description here



On the bottom right you can see the coordinates of the mouse cursor and the value of the array you are moving over.
This works fine on the coloured tiles. But I also expect to get no value when I move my mouse over the white plates.



On the top and on the right side, this does happen. But not on the bottom and on the left.
If you move your mouse to the position, lets say (-0.5, 2.5), you will still get a value. That makes no sense to me.



Am I doing something wrong or is that a bug? I am using Matplotlib 3.0.3. and Numpy 1.16.2.



Thank you :)










share|improve this question





















  • 1





    Looks like this is fixed in the current development version. There will be a release of matplotlib 3.1 soonish. In any case the observed behaviour is not detrimental, you just see the value of the neighboring pixel when moving the mouse outside and to the left and/or bottom. The values inside are correct.

    – ImportanceOfBeingErnest
    Mar 28 at 19:46











  • So it is really a bug :O

    – Max16hr
    Mar 28 at 22:51

















0















With this code you can produce such an image:



import matplotlib.pyplot as plt
import numpy as np

axes = plt.subplot()
axes.set_aspect(1)
axes.format_coord = "x=:1.2f, y=:1.2f".format

pltRange = range(-1, 12)
axes.set_xlim(min(pltRange), max(pltRange))
axes.set_ylim(min(pltRange), max(pltRange))
axes.set_xticks(pltRange)
axes.set_yticks(pltRange)
plt.grid(True)

array = np.random.random((10, 10))
image = axes.imshow(array, extent=[0, 10, 0, 10], origin='lower')
image.format_cursor_data = " | Value: :8f".format

plt.show()


enter image description here



On the bottom right you can see the coordinates of the mouse cursor and the value of the array you are moving over.
This works fine on the coloured tiles. But I also expect to get no value when I move my mouse over the white plates.



On the top and on the right side, this does happen. But not on the bottom and on the left.
If you move your mouse to the position, lets say (-0.5, 2.5), you will still get a value. That makes no sense to me.



Am I doing something wrong or is that a bug? I am using Matplotlib 3.0.3. and Numpy 1.16.2.



Thank you :)










share|improve this question





















  • 1





    Looks like this is fixed in the current development version. There will be a release of matplotlib 3.1 soonish. In any case the observed behaviour is not detrimental, you just see the value of the neighboring pixel when moving the mouse outside and to the left and/or bottom. The values inside are correct.

    – ImportanceOfBeingErnest
    Mar 28 at 19:46











  • So it is really a bug :O

    – Max16hr
    Mar 28 at 22:51













0












0








0








With this code you can produce such an image:



import matplotlib.pyplot as plt
import numpy as np

axes = plt.subplot()
axes.set_aspect(1)
axes.format_coord = "x=:1.2f, y=:1.2f".format

pltRange = range(-1, 12)
axes.set_xlim(min(pltRange), max(pltRange))
axes.set_ylim(min(pltRange), max(pltRange))
axes.set_xticks(pltRange)
axes.set_yticks(pltRange)
plt.grid(True)

array = np.random.random((10, 10))
image = axes.imshow(array, extent=[0, 10, 0, 10], origin='lower')
image.format_cursor_data = " | Value: :8f".format

plt.show()


enter image description here



On the bottom right you can see the coordinates of the mouse cursor and the value of the array you are moving over.
This works fine on the coloured tiles. But I also expect to get no value when I move my mouse over the white plates.



On the top and on the right side, this does happen. But not on the bottom and on the left.
If you move your mouse to the position, lets say (-0.5, 2.5), you will still get a value. That makes no sense to me.



Am I doing something wrong or is that a bug? I am using Matplotlib 3.0.3. and Numpy 1.16.2.



Thank you :)










share|improve this question
















With this code you can produce such an image:



import matplotlib.pyplot as plt
import numpy as np

axes = plt.subplot()
axes.set_aspect(1)
axes.format_coord = "x=:1.2f, y=:1.2f".format

pltRange = range(-1, 12)
axes.set_xlim(min(pltRange), max(pltRange))
axes.set_ylim(min(pltRange), max(pltRange))
axes.set_xticks(pltRange)
axes.set_yticks(pltRange)
plt.grid(True)

array = np.random.random((10, 10))
image = axes.imshow(array, extent=[0, 10, 0, 10], origin='lower')
image.format_cursor_data = " | Value: :8f".format

plt.show()


enter image description here



On the bottom right you can see the coordinates of the mouse cursor and the value of the array you are moving over.
This works fine on the coloured tiles. But I also expect to get no value when I move my mouse over the white plates.



On the top and on the right side, this does happen. But not on the bottom and on the left.
If you move your mouse to the position, lets say (-0.5, 2.5), you will still get a value. That makes no sense to me.



Am I doing something wrong or is that a bug? I am using Matplotlib 3.0.3. and Numpy 1.16.2.



Thank you :)







matplotlib coordinates python-3.7 imshow extent






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 17:01







Max16hr

















asked Mar 28 at 16:41









Max16hrMax16hr

941 silver badge9 bronze badges




941 silver badge9 bronze badges










  • 1





    Looks like this is fixed in the current development version. There will be a release of matplotlib 3.1 soonish. In any case the observed behaviour is not detrimental, you just see the value of the neighboring pixel when moving the mouse outside and to the left and/or bottom. The values inside are correct.

    – ImportanceOfBeingErnest
    Mar 28 at 19:46











  • So it is really a bug :O

    – Max16hr
    Mar 28 at 22:51












  • 1





    Looks like this is fixed in the current development version. There will be a release of matplotlib 3.1 soonish. In any case the observed behaviour is not detrimental, you just see the value of the neighboring pixel when moving the mouse outside and to the left and/or bottom. The values inside are correct.

    – ImportanceOfBeingErnest
    Mar 28 at 19:46











  • So it is really a bug :O

    – Max16hr
    Mar 28 at 22:51







1




1





Looks like this is fixed in the current development version. There will be a release of matplotlib 3.1 soonish. In any case the observed behaviour is not detrimental, you just see the value of the neighboring pixel when moving the mouse outside and to the left and/or bottom. The values inside are correct.

– ImportanceOfBeingErnest
Mar 28 at 19:46





Looks like this is fixed in the current development version. There will be a release of matplotlib 3.1 soonish. In any case the observed behaviour is not detrimental, you just see the value of the neighboring pixel when moving the mouse outside and to the left and/or bottom. The values inside are correct.

– ImportanceOfBeingErnest
Mar 28 at 19:46













So it is really a bug :O

– Max16hr
Mar 28 at 22:51





So it is really a bug :O

– Max16hr
Mar 28 at 22:51












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/4.0/"u003ecc by-sa 4.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%2f55402839%2fmatplotlib-imshow-gives-values-outside-of-extent-bug%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%2f55402839%2fmatplotlib-imshow-gives-values-outside-of-extent-bug%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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현