You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(1) |
2
(8) |
3
(10) |
4
|
5
(4) |
6
|
7
(5) |
8
(6) |
9
(4) |
10
(12) |
11
(7) |
12
(2) |
13
(2) |
14
(5) |
15
(9) |
16
(4) |
17
(7) |
18
(2) |
19
(12) |
20
(8) |
21
(11) |
22
(11) |
23
(2) |
24
(18) |
25
(18) |
26
(6) |
27
(7) |
28
(10) |
29
(7) |
30
(31) |
31
(10) |
|
On 2012年08月14日 4:04 AM, Chad Parker wrote: > I've also noticed that using interpolation seems to make a difference. > When I use the default interpolation the plots *seem* to come out fine, > although some of my other data do look a little bit shifted, but that > could be some other effect. Yes, I think the problem is specific to interpolation="none". Thanks for doing the additional testing. I looked quickly at a pdf and didn't see it, but presumably that reflected the difference in pdf viewers. Eric
From: Mark Bakker [mailto:ma...@gm...] Sent: Thursday, August 09, 2012 14:43 I am glad to see you can reproduce the error, Stan. I am running whatever is default with a PythonXY installation (sorry my windows machine is at work). Strange behavior. The code works fine on my mac (PyQt4 backend) with all options (show,draw,pause). Should we file a bug report? Mark I'd say that it's your call, but what you found does seem appropriate for a bug report.
I've also done some additional testing to see if I could figure out what was going on, and it turns out that it's not just a problem with eps files. This problem also occurs in the other vector graphics formats, ps/eps/pdf/svg. In all cases the entire image is actually contained within the file, it's just shifted and clipped. Sometimes it's shifted so much that none of it is within the axes window and thus the entire image gets clipped and it appears not to be there at all. I also discovered that the time axis isn't actually a factor. I've also noticed that using interpolation seems to make a difference. When I use the default interpolation the plots *seem* to come out fine, although some of my other data do look a little bit shifted, but that could be some other effect. Another weird thing that I've noticed is that different viewers interpret this shifting in different ways. For example, the pdfs all look fine when I view them in Okular, but are shifted in xpdf. (At some point I submitted a second email to the list re: this problem that had screenshots attached. I don't know if it ever made it through however.) I'll submit the but report on the git tracker. Round-off error could make sense. --Chad Here's my most recent set of test code: import matplotlib.pyplot as plt from matplotlib.colors import LogNorm imgData = [[1.0/(x) + 1.0/(y) for x in range(1,100)] for y in range(1,100)] tMin=734717.945208 tMax=734717.946366 # Case 0: Works Case0={"id":0, "interp":None, "extents":(tMin,tMax,1,100)} # Case 1: Works Case1={"id":1, "interp":"none", "extents":(1,100,1,100)} # Case 2: Doesn't work Case2={"id":2, "interp":"none", "extents":(tMin,tMax,1,100)} for Case in (Case2, Case1, Case0): plt.figure(Case["id"]) axImg=plt.subplot(111) axImg.imshow(imgData, norm=LogNorm(), interpolation=Case["interp"], extent=Case["extents"]) axImg.set_aspect('auto') for filetype in ["png", "eps", "pdf", "svg"]: plt.savefig("imageshift-Case{0}.{1}".format(Case["id"], filetype)) On Tue, Aug 14, 2012 at 3:19 AM, Eric Firing <ef...@ha...> wrote: > On 2012年08月13日 3:58 PM, Benjamin Root wrote: > > > > > > On Thu, Aug 2, 2012 at 7:21 PM, Chad Parker <par...@gm... > > <mailto:par...@gm...>> wrote: > > > > Hello everyone- > > > > I'm a new Python/Matplotlib user, but I have quite a bit of plotting > > experience with octave/matlab and gnuplot. So, I apologize in > > advance if my python style is terrible and if I give you all the > > wrong information! > > > > I'm having a problem saving figures that contain images as eps files > > when my x-axis is a date/time axis. The trouble is that in the > > resulting eps file, the image data is shifted relative to the axis. > > I've attached two images as an example. In the .png file the > > alignment is correct and in the eps file it's not. The png is also > > nearly identical to what I get when I plot to the screen. The script > > I wrote to generate these plots is at the end of this message. > > > > It's worth noting that the two output images are identical if the > > x-axis is simply numerical and not a time series. > > > > I'm using python 2.7.3 and Matplotlib 1.1.0 > > > > Some Google searches dug up this old thread, however, the shift that > > I'm experiencing seems to be much greater, so I don't know if it's > > related: > > > http://old.nabble.com/Saving-as-eps-file-shifts-image--td29232680.html > > > > Can anyone help me solve this? > > Thanks in advance, > > --Chad > > > > > > Here is a minimal script that I used to generate these plots: > > > > import matplotlib.pyplot as plt > > import matplotlib.dates as dts > > from matplotlib.colors import LogNorm > > > > imgData = [[1.0/x + 1.0/y for x in range(1,100)] for y in > range(1,100)] > > > > tMin=dts.epoch2num(1343947266) > > tMax=dts.epoch2num(1343947266+100) > > > > axImg=plt.subplot(111) > > axImg.imshow(imgData, norm=LogNorm(),extent=(tMin,tMax,1,100),\ > > interpolation='none', origin="upper") > > axImg.xaxis_date() > > axImg.set_aspect('auto') > > > > plt.savefig("imageshift.png") > > plt.savefig("imageshift.eps") > > > > > > Confirmed. This is a fairly nasty-looking result. And I am not exactly > > sure what is happening here. Note that it does not matter if the png or > > the eps images were saved first. It looks like an auto-scaling bug, but > > given that it doesn't impact the png image, I am not so sure. > > This appears to be some sort of truncation error bug; it has nothing to > do with dates. Here is a modified illustration: > > import matplotlib.pyplot as plt > from matplotlib.colors import LogNorm > > imgData = [[1.0/x + 1.0/y for x in range(1,10)] for y in range(1,10)] > > tMin = 1000000066 # Shifted by half > tMin = 100000066 # Blank! > tMin = 10000066 # OK > tMax = tMin+10 > > # The following combination is also shifted by half > tMin = 10000066.1 # adding the 0.1 doesn't make a difference > tMax = tMin+1 > > print tMin, tMax > > axImg=plt.subplot(111) > axImg.imshow(imgData, norm=LogNorm(), extent=(tMin,tMax,1,10), > interpolation='none', origin="upper") > axImg.set_aspect('auto') > > plt.savefig("imageshift.png") > plt.savefig("imageshift.eps") > plt.savefig("imageshift.pdf") > > I thought it might come from the use of str() instead of repr() when > generating the concat matrix in the ps backend, but that's not it. I'm > suspecting it may be inherent in the ps language, when one uses a matrix > to make an enormous translation in one direction, and then uses > translate to sling everything back in the other direction. Either that, > or some sort of "snapping" is going on. > > Eric > > > > > Could you file a bug report on this at the github tracker? I would like > > to see this fixed before the 1.2.0 release. > > > > Thanks! > > Ben Root > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On 2012年08月13日 3:58 PM, Benjamin Root wrote: > > > On Thu, Aug 2, 2012 at 7:21 PM, Chad Parker <par...@gm... > <mailto:par...@gm...>> wrote: > > Hello everyone- > > I'm a new Python/Matplotlib user, but I have quite a bit of plotting > experience with octave/matlab and gnuplot. So, I apologize in > advance if my python style is terrible and if I give you all the > wrong information! > > I'm having a problem saving figures that contain images as eps files > when my x-axis is a date/time axis. The trouble is that in the > resulting eps file, the image data is shifted relative to the axis. > I've attached two images as an example. In the .png file the > alignment is correct and in the eps file it's not. The png is also > nearly identical to what I get when I plot to the screen. The script > I wrote to generate these plots is at the end of this message. > > It's worth noting that the two output images are identical if the > x-axis is simply numerical and not a time series. > > I'm using python 2.7.3 and Matplotlib 1.1.0 > > Some Google searches dug up this old thread, however, the shift that > I'm experiencing seems to be much greater, so I don't know if it's > related: > http://old.nabble.com/Saving-as-eps-file-shifts-image--td29232680.html > > Can anyone help me solve this? > Thanks in advance, > --Chad > > > Here is a minimal script that I used to generate these plots: > > import matplotlib.pyplot as plt > import matplotlib.dates as dts > from matplotlib.colors import LogNorm > > imgData = [[1.0/x + 1.0/y for x in range(1,100)] for y in range(1,100)] > > tMin=dts.epoch2num(1343947266) > tMax=dts.epoch2num(1343947266+100) > > axImg=plt.subplot(111) > axImg.imshow(imgData, norm=LogNorm(),extent=(tMin,tMax,1,100),\ > interpolation='none', origin="upper") > axImg.xaxis_date() > axImg.set_aspect('auto') > > plt.savefig("imageshift.png") > plt.savefig("imageshift.eps") > > > Confirmed. This is a fairly nasty-looking result. And I am not exactly > sure what is happening here. Note that it does not matter if the png or > the eps images were saved first. It looks like an auto-scaling bug, but > given that it doesn't impact the png image, I am not so sure. This appears to be some sort of truncation error bug; it has nothing to do with dates. Here is a modified illustration: import matplotlib.pyplot as plt from matplotlib.colors import LogNorm imgData = [[1.0/x + 1.0/y for x in range(1,10)] for y in range(1,10)] tMin = 1000000066 # Shifted by half tMin = 100000066 # Blank! tMin = 10000066 # OK tMax = tMin+10 # The following combination is also shifted by half tMin = 10000066.1 # adding the 0.1 doesn't make a difference tMax = tMin+1 print tMin, tMax axImg=plt.subplot(111) axImg.imshow(imgData, norm=LogNorm(), extent=(tMin,tMax,1,10), interpolation='none', origin="upper") axImg.set_aspect('auto') plt.savefig("imageshift.png") plt.savefig("imageshift.eps") plt.savefig("imageshift.pdf") I thought it might come from the use of str() instead of repr() when generating the concat matrix in the ps backend, but that's not it. I'm suspecting it may be inherent in the ps language, when one uses a matrix to make an enormous translation in one direction, and then uses translate to sling everything back in the other direction. Either that, or some sort of "snapping" is going on. Eric > > Could you file a bug report on this at the github tracker? I would like > to see this fixed before the 1.2.0 release. > > Thanks! > Ben Root >
On Thu, Aug 2, 2012 at 7:21 PM, Chad Parker <par...@gm...>wrote: > Hello everyone- > > I'm a new Python/Matplotlib user, but I have quite a bit of plotting > experience with octave/matlab and gnuplot. So, I apologize in advance if my > python style is terrible and if I give you all the wrong information! > > I'm having a problem saving figures that contain images as eps files when > my x-axis is a date/time axis. The trouble is that in the resulting eps > file, the image data is shifted relative to the axis. I've attached two > images as an example. In the .png file the alignment is correct and in the > eps file it's not. The png is also nearly identical to what I get when I > plot to the screen. The script I wrote to generate these plots is at the > end of this message. > > It's worth noting that the two output images are identical if the x-axis > is simply numerical and not a time series. > > I'm using python 2.7.3 and Matplotlib 1.1.0 > > Some Google searches dug up this old thread, however, the shift that I'm > experiencing seems to be much greater, so I don't know if it's related: > http://old.nabble.com/Saving-as-eps-file-shifts-image--td29232680.html > > Can anyone help me solve this? > Thanks in advance, > --Chad > > > Here is a minimal script that I used to generate these plots: > > import matplotlib.pyplot as plt > import matplotlib.dates as dts > from matplotlib.colors import LogNorm > > imgData = [[1.0/x + 1.0/y for x in range(1,100)] for y in range(1,100)] > > tMin=dts.epoch2num(1343947266) > tMax=dts.epoch2num(1343947266+100) > > axImg=plt.subplot(111) > axImg.imshow(imgData, norm=LogNorm(),extent=(tMin,tMax,1,100),\ > interpolation='none', origin="upper") > axImg.xaxis_date() > axImg.set_aspect('auto') > > plt.savefig("imageshift.png") > plt.savefig("imageshift.eps") > > Confirmed. This is a fairly nasty-looking result. And I am not exactly sure what is happening here. Note that it does not matter if the png or the eps images were saved first. It looks like an auto-scaling bug, but given that it doesn't impact the png image, I am not so sure. Could you file a bug report on this at the github tracker? I would like to see this fixed before the 1.2.0 release. Thanks! Ben Root