You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(33) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(44) |
Mar
(51) |
Apr
(43) |
May
(43) |
Jun
(36) |
Jul
(61) |
Aug
(44) |
Sep
(25) |
Oct
(82) |
Nov
(97) |
Dec
(47) |
2005 |
Jan
(77) |
Feb
(143) |
Mar
(42) |
Apr
(31) |
May
(93) |
Jun
(93) |
Jul
(35) |
Aug
(78) |
Sep
(56) |
Oct
(44) |
Nov
(72) |
Dec
(75) |
2006 |
Jan
(116) |
Feb
(99) |
Mar
(181) |
Apr
(171) |
May
(112) |
Jun
(86) |
Jul
(91) |
Aug
(111) |
Sep
(77) |
Oct
(72) |
Nov
(57) |
Dec
(51) |
2007 |
Jan
(64) |
Feb
(116) |
Mar
(70) |
Apr
(74) |
May
(53) |
Jun
(40) |
Jul
(519) |
Aug
(151) |
Sep
(132) |
Oct
(74) |
Nov
(282) |
Dec
(190) |
2008 |
Jan
(141) |
Feb
(67) |
Mar
(69) |
Apr
(96) |
May
(227) |
Jun
(404) |
Jul
(399) |
Aug
(96) |
Sep
(120) |
Oct
(205) |
Nov
(126) |
Dec
(261) |
2009 |
Jan
(136) |
Feb
(136) |
Mar
(119) |
Apr
(124) |
May
(155) |
Jun
(98) |
Jul
(136) |
Aug
(292) |
Sep
(174) |
Oct
(126) |
Nov
(126) |
Dec
(79) |
2010 |
Jan
(109) |
Feb
(83) |
Mar
(139) |
Apr
(91) |
May
(79) |
Jun
(164) |
Jul
(184) |
Aug
(146) |
Sep
(163) |
Oct
(128) |
Nov
(70) |
Dec
(73) |
2011 |
Jan
(235) |
Feb
(165) |
Mar
(147) |
Apr
(86) |
May
(74) |
Jun
(118) |
Jul
(65) |
Aug
(75) |
Sep
(162) |
Oct
(94) |
Nov
(48) |
Dec
(44) |
2012 |
Jan
(49) |
Feb
(40) |
Mar
(88) |
Apr
(35) |
May
(52) |
Jun
(69) |
Jul
(90) |
Aug
(123) |
Sep
(112) |
Oct
(120) |
Nov
(105) |
Dec
(116) |
2013 |
Jan
(76) |
Feb
(26) |
Mar
(78) |
Apr
(43) |
May
(61) |
Jun
(53) |
Jul
(147) |
Aug
(85) |
Sep
(83) |
Oct
(122) |
Nov
(18) |
Dec
(27) |
2014 |
Jan
(58) |
Feb
(25) |
Mar
(49) |
Apr
(17) |
May
(29) |
Jun
(39) |
Jul
(53) |
Aug
(52) |
Sep
(35) |
Oct
(47) |
Nov
(110) |
Dec
(27) |
2015 |
Jan
(50) |
Feb
(93) |
Mar
(96) |
Apr
(30) |
May
(55) |
Jun
(83) |
Jul
(44) |
Aug
(8) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(1) |
2
|
3
|
4
|
5
|
6
(3) |
7
(2) |
8
(13) |
9
(4) |
10
|
11
|
12
|
13
(1) |
14
|
15
|
16
|
17
(3) |
18
(1) |
19
|
20
(4) |
21
(9) |
22
|
23
(1) |
24
|
25
|
26
(2) |
27
(6) |
28
|
29
|
30
|
31
|
From: Thomas C. <tca...@gm...> - 2015-01-17 19:29:48
|
Hey all, We have set up waffle.io to try and help manage our issues: https://waffle.io/matplotlib/ If you have commit rights, you should be able to move the cards around. Any thoughts on this tool? I would like to use this to keep track of the review state of PRs. Tom |
From: Thomas C. <tca...@gm...> - 2015-01-13 05:08:21
|
Hello all, I would like to try to hit the Feb 1 target date for 1.4.3 and plan to do an RC next Monday (Jan 19). Any major protests from anyone on this timeline? If people could take a look at the 1.4.3 and 1.4.x milestones on github and either move stuff around (in terms of finding any blockers) or to get some of the issues (in particular the quiver and documentation related ones) taken care of that would be great! Tom |
From: Eric F. <ef...@ha...> - 2015-01-09 20:01:20
|
On 2015/01/09 9:54 AM, Paul Ganssle wrote: > Thanks for the responses. If no one minds, I'm take a look at how to > best implement datetime64 this weekend and the degree to which it might > be useful, then maybe I can start an MEP for it. Paul, I think everyone will be delighted to have you do this--preferably all the way to a PR. > > I agree with Chris's sentiment that it's likely not a bad idea to start > on it now, since there will almost certainly be a significant lag in > raising the Numpy dependency version anyway, so if it can be implemented > in some reasonable way now, we might as well, otherwise it may be some > years before we get to it. > Yes, by all means. Eric |
From: Paul G. <pga...@gm...> - 2015-01-09 19:54:54
|
Thanks for the responses. If no one minds, I'm take a look at how to best implement datetime64 this weekend and the degree to which it might be useful, then maybe I can start an MEP for it. I agree with Chris's sentiment that it's likely not a bad idea to start on it now, since there will almost certainly be a significant lag in raising the Numpy dependency version anyway, so if it can be implemented in some reasonable way now, we might as well, otherwise it may be some years before we get to it. Let's say we want a time zone aware date time converter. The basic goal is to convert some input type (datetime) to the MPL internal type (float days past Jan 0, 0001). We also need to tell MPL how to format the axis (default formatter, locator, limits, label). - The convert() method takes the input type (datetime) and the xunits (or yunits) keyword argument and converts it to the MPL type. The axis input can be used to change the results depending on the plot type (polar plots always require radians for example). For the TZ converter, would take the input value (datetime), convert it to the time zone requested by the units input, then convert that to a float using dates.date2num(). Note that the input can be a sequence or a single value so the converter has to handle both cases. - The axisinfo() method is used to provide the default axis locator and formatter objects when the user creates a plot with this type. The axis input is useful here to handle the result differently for a polar plot. For the TZ converter, this would be exactly the same as the web docs - return the default locator and formatter for dates. Most of the time this method can just return standard MPL formatters and locators (for either dates or numbers). - The default_units() method provides a default value for the xunits or yunits keyword argument if one isn't specified. The default in this case might be "UTC". Hope that helps some, if you have more specific questions feel free to send them to me. Ted ------------------------------ *From:* Thomas Caswell [tca...@gm...] *Sent:* Thursday, January 08, 2015 11:14 AM *To:* Drain, Theodore R (392P); mat...@li... *Subject:* Re: [matplotlib-devel] Date overhaul? I was hoping for something a bit more extensive of the intenals. I have tried to understand the units code a couple of times now and always hit a brick wall. On Thu Jan 08 2015 at 2:07:02 PM Drain, Theodore R (392P) < the...@jp...> wrote: > Google search "matplotlib units" yields: > http://matplotlib.org/api/units_api.html > > > > So it sounds like the update is to make MPL's internal date system higher > resolution which would be great. We would just need to update our > converters to convert to that format instead of the current floating point > format. Our custom classes are not public (and can't really be made > public) but they aren't very complicated so we can certainly talk about the > implementation if that helps. > > > ------------------------------ > *From:* Thomas Caswell [tca...@gm...] > *Sent:* Thursday, January 08, 2015 10:57 AM > *To:* Drain, Theodore R (392P); mat...@li... > > *Subject:* Re: [matplotlib-devel] Date overhaul? > One of the other driving factors to over-haul the default date > handling is that floats do not have enough precision to deal with > nano-second resolution data (which is what I think drove pandas to use > datetime64). > > It sounds like the correct solution > > Is the unit framework documented anywhere and are those custom classes > public? > > Tom > > On Thu Jan 08 2015 at 12:59:17 PM Drain, Theodore R (392P) < > the...@jp...> wrote: > >> I agree w/ the original poster that it would help to have a MEP to >> clearly define what the goals of the overhaul are >> >> >> >> Something else to keep in mind: we at least don't normally plot dates in >> "earth" based time systems. ~10 years ago we contracted with John Hunter >> to add the arbitrary unit system to MPL. This allows users to plot in >> their own data types and define a converter to handle the conversion to MPL >> types and labeling. We have our own "date time" like class which handles >> relativistic time scales (TDB, TT, TAI, GPS, Mars time, etc) at extremely >> high precision. We register a unit converter w/ MPL which allows our users >> to plot these types natively and use the xunits keyword (or yunits) to >> control how the plot looks. So we can do this: >> >> >> >> plot( x, y, xunits="GPS", yunits="km/s" ) >> >> plot( x, y, xunits="PST", yunits="mph" ) >> >> >> >> It would also be pretty easy to add a time zone aware unit converter with >> the existing MPL code which would allow you to do things w/ datetime like >> this: >> >> >> >> plot( x, y, xunits="UTC+8" ) >> >> plot( x, y, xunits="EST" ) >> >> >> >> I guess the point of this is to remind folks that not everyone plots >> dates in time zone based systems... >> >> >> >> Ted >> >> >> ------------------------------ >> *From:* Chris Barker [chr...@no...] >> *Sent:* Thursday, January 08, 2015 9:00 AM >> *To:* mat...@li... >> *Subject:* Re: [matplotlib-devel] Date overhaul? >> >> On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...> >> wrote: >> >>> I'm real naive about this stuff, but I have always wondered why >>> matplotlib didn't just use datetime objects, or at least use >>> timezone-aware datetime objects as an "interchange" format to get the >>> timezone stuff right. >>> >> >> Time zone handling is a pain in the %}€* >> >> And the definitions keep changing. >> >> So you need a complex DB and library that needs frequent updating. >> >> This is why neither the standard library nor numpy support time zone >> handling out of the box. >> >> But the datetime object does support a hook to add timezone info. >> >> The numpy datetime64 may implementation _may_ provide a similar hook >> in the future. >> >> There is the pytz package, which MPL could choose to depend on. >> >> But even that is a bit ugly--e.g. from the pytz docs: >> >> """Unfortunately using the tzinfo argument of the standard datetime >> constructors ‘’does not work’’ with pytz for many timezones.""" >> >> So my suggestion is that MPL punts, and stick with leaving time zone >> handling up to the user, I.e only use datetimes that are timezone "naive". >> What this means is that MPL would always a assume all datetimes interacting >> with each other are in the same time zone (including same DST status). >> >> Anyway, I'm being a bit lazy here, so I may be wrong, but I think the >> issue at hand is that MPL currently uses a float array to store and >> manipulate datetimes, and the thought is that it may be better to use >> numpy datetime64 arrays -- that would give us more consistent precision, >> and less code to convert to/from various datetime formats. >> I'm a bit on the fence about whether it's time to do it, as datetime64 >> does have issues with the locale timezone, but as any implementation would >> want to work with not-just-the-latest numpy anyway, it may make sense to >> start now. >> >> -Chris >> >> >> >> >> >> >> -- >> >> Christopher Barker, Ph.D. >> Oceanographer >> >> Emergency Response Division >> NOAA/NOS/OR&R (206) 526-6959 voice >> 7600 Sand Point Way NE (206) 526-6329 fax >> Seattle, WA 98115 (206) 526-6317 main reception >> >> Chr...@no... >> ------------------------------------------------------------ >> ------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >> > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Matplotlib-devel mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |
From: Tony Yu <ts...@gm...> - 2015-01-09 02:11:22
|
Thanks Max! I was planning to add a more interactive interface, really similar to what you're suggesting. I haven't gotten around to it, but hopefully, I'll have some time to play around with that. On Thu, Jan 8, 2015 at 4:56 PM, Maximilian Albert < max...@gm...> wrote: > Hi Tony, > > This is awesome. Great work! > > I was wondering, is there an easy way to cycle through all available > styles for a given plot? For instance, clicking on the top left plot > displays a maximized image of the "bmh" style. It would be great if one > could press arrow-down (say) to cycle through the other styles > "dark_background", "fivethirtyeight", etc. for a quick comparison. > > Cheers, > Max > > > 2015-01-06 4:42 GMT+00:00 Tony Yu <ts...@gm...>: > >> I've been playing around with learning Javascript lately. As part of the >> process, I created a Flask app to build a gallery for matplotlib style >> sheets: >> >> https://github.com/tonysyu/matplotlib-style-gallery >> >> If you run that locally, you can actually input styles, either with a URL >> to a *.mplstyle file or with matplotlibrc commands. Here's a static version >> without the custom inputs: >> >> http://tonysyu.github.io/raw_content/matplotlib-style-gallery/gallery.html >> >> Ideally, I'd get this into a form that could be submitted as a PR for the >> matplotlib website, but I'll need a bit more spare time to learn some more >> web development (sessions, client storage, etc). >> >> Cheers! >> -Tony >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >> >> > |
From: Nathaniel S. <nj...@po...> - 2015-01-09 01:17:29
|
On Thu, Jan 8, 2015 at 10:30 PM, Maximilian Albert <max...@gm...> wrote: > Hi Nathaniel, > >> >> > Basically, it allows you to pick the start/end color of a colormap from >> > two >> > cross sections in CIELab space and interpolates those colors linearly >> > (see >> > the README file for more details). >> >> There's a downside to this approach for the kinds of colormaps we've >> been talking about in this thread, where we want both a large >> lightness range plus a colorful result. The problem is that the way >> color space is shaped, you can't simultaneously have both high >> saturation (colorfulness) *and* high/low lightness. So if you pick >> your extreme points to be near black and white, then they can only >> have a slight tinting of color, and then if you linearly interpolate >> between these, then you end up with slightly tinted greyscale. > > > You raise an excellent point here. It explains nicely what I have > experienced while playing with my GUI. Indeed, I found that a simple linear > interpolation did not result in totally satisfactory colormaps (see my > previous reply to Federico). I couldn't quite explain why, but your > explanation makes this clear. > > One exception I encountered is an interpolation between dark blue and yellow > as in the attached screenshot (which I hope makes it through to the mailing > list) - probably because it mostly avoids the low-saturation (grey-ish) > region of the color space. I guess this probably also has to do with another weird feature of how the colorspace is shaped. You'll often see pictures in books that illustrate it like two cones: http://www.tvtechnology.com/BE_Files/uploads/2013/05/ColorTopCones-305be18.jpg which does capture the general idea that your range of saturations is widest when lightness is in the middle, and narrows down when you move towards black or white. But it's actually a bit more complicated than that -- the actual shape is sorta lumpy, more like the picture here: http://www.gamutvision.com/ In particular, you can have pretty-saturated blues even at very low lightnesses, and pretty-saturated yellows even at high lightnesses. E.g. there literally does not exist a dark red that's as intense as the most intense dark blue. So this makes dark-blue-to-light-yellow the obvious way to go if you want a dark-to-light colormap that is also colorful. I don't think it's a coincidence that parula does exactly this :-) There is an obvious degree of freedom here though -- the color wheel is, like, a wheel, so if you want to go from blue to yellow you can do that either clockwise or counterclockwise, i.e., you can go through green or you can go through red. Parula goes via green (and so does matplotlib's YlGnBu, for that matter). If we want to have a distinctive colormap that people won't confuse with Matlab(R)(TM) then maybe we should make a blue-purple-red-yellow one. And in fact, this is probably theoretically optimal! As another weird quirk of how color works, the 4 focal colors (red/green/blue/yellow) are not actually at right angles to each other on the hue circle -- see the lower diagram on this figure: https://books.google.co.uk/books?id=MZ-TM0f2twAC&lpg=PA323&ots=XB_jHt0wz1&dq=%22the%20cie%20colour%20appearance%20model%22%20hunt%20and%20pointer&pg=PA307#v=onepage&q&f=false >From yellow-to-blue via red is a ~213 degree angle, while yellow-to-blue-via-green is only a ~147 degree angle (in a space where we define our "hue angle" based on perceptual just-noticeable-differences). So a blue-purple-red-yellow colormap should theoretically have higher perceptual resolution than a blue-green-yellow colormap. > But I agree with you that using a curved, rather > than linear, interpolation can probably yield better results. > > It sounds like you have a good deal of experience with various color spaces > and colormaps. Do you have an idea for a good "recipe" how to pick a curve > in a given colorspace that leads to a satisfactory colormap? I haven't tried it yet, but my first idea would be to say that I want a linear ramp in lightness (CIECAM02's "J"), and a linear ramp in hue (CIECAM02's "h"), that starts at blue and ends at yellow, and then run an optimizer to try and find a set of colorfulness values (CIECAM02's "M") that maximize some criteria, i.e.: -- need to stay within the sRGB gamut -- the points should be as close to equidistant as possible (measured in CAM02-UCS space) -- the total arc should be as long as possible (measured in CAM02-UCS space) (this forces it to use the large colorfulness values when available) -- and maybe some sort of wiggliness penalty (integral of squared third derivative or something?) to smooth it out a bit Then it just becomes an optimization problem -- given any proposed set of JMh values we can convert into sRGB to check the gamut, convert in CAM02-UCS to check the distances, etc., and compute an objective function. > My first idea > was to change the interpolating line to a circular arc passing through an > "intermediate" color, but it's not clear to me whether there is any > preferred "direction" for nudging the line into an arc. Also, most other > colormaps, such as the examples "YlGnBu" and "cubehelix" which you > mentioned, use more complicated curves than mere circular arcs (btw, kudos > for your script - it's a great way of visualising these colormaps). I don't > have enough knowledge yet to decide whether either approach is better. I've > started toying with curved interpolations in my code but this is not quite > ready to be pushed to Github yet. Anyway, if you have any suggestions I'd > love to hear them. > > I also found a few more blog posts and papers which I hadn't seen before and > which look extremely useful: > > (i) "Subtleties of color" > > http://earthobservatory.nasa.gov/blogs/elegantfigures/2013/08/05/subtleties-of-color-part-1-of-6/ > > A series of six blog posts with an excellent introduction to color theory > and the issues around choosing colormaps. Well worth a read! It also > suggests that CIE L*c*h* space (which uses the three variables lightness, > chroma (saturation) and hue), may be a better choice than CIE L*a*b*, which > I have been using so far. They're kinda the same thing -- c*h* is just the polar coordinates version of a*b*, so you can switch back and forth depending on which way of thinking about things feels more natural for a given task. Of course if you do linear interpolation in polar coordinates you get some sort of funky curve, so I guess it would make a difference that way :-). (And the Mh that I talk about above are also conceptually just a polar coordinates version of a and b -- the CIECAM02 calculations literally have intermediate values called a and b that play the same role as CIEL*a*b*'s a* and b*.) -n -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org |
From: Maximilian A. <max...@gm...> - 2015-01-08 22:56:18
|
Hi Tony, This is awesome. Great work! I was wondering, is there an easy way to cycle through all available styles for a given plot? For instance, clicking on the top left plot displays a maximized image of the "bmh" style. It would be great if one could press arrow-down (say) to cycle through the other styles "dark_background", "fivethirtyeight", etc. for a quick comparison. Cheers, Max 2015-01-06 4:42 GMT+00:00 Tony Yu <ts...@gm...>: > I've been playing around with learning Javascript lately. As part of the > process, I created a Flask app to build a gallery for matplotlib style > sheets: > > https://github.com/tonysyu/matplotlib-style-gallery > > If you run that locally, you can actually input styles, either with a URL > to a *.mplstyle file or with matplotlibrc commands. Here's a static version > without the custom inputs: > > http://tonysyu.github.io/raw_content/matplotlib-style-gallery/gallery.html > > Ideally, I'd get this into a form that could be submitted as a PR for the > matplotlib website, but I'll need a bit more spare time to learn some more > web development (sessions, client storage, etc). > > Cheers! > -Tony > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > |
From: Maximilian A. <max...@gm...> - 2015-01-08 22:30:25
|
Hi Nathaniel, > > Basically, it allows you to pick the start/end color of a colormap from > two > > cross sections in CIELab space and interpolates those colors linearly > (see > > the README file for more details). > > There's a downside to this approach for the kinds of colormaps we've > been talking about in this thread, where we want both a large > lightness range plus a colorful result. The problem is that the way > color space is shaped, you can't simultaneously have both high > saturation (colorfulness) *and* high/low lightness. So if you pick > your extreme points to be near black and white, then they can only > have a slight tinting of color, and then if you linearly interpolate > between these, then you end up with slightly tinted greyscale. > You raise an excellent point here. It explains nicely what I have experienced while playing with my GUI. Indeed, I found that a simple linear interpolation did not result in totally satisfactory colormaps (see my previous reply to Federico). I couldn't quite explain why, but your explanation makes this clear. One exception I encountered is an interpolation between dark blue and yellow as in the attached screenshot (which I hope makes it through to the mailing list) - probably because it mostly avoids the low-saturation (grey-ish) region of the color space. But I agree with you that using a curved, rather than linear, interpolation can probably yield better results. It sounds like you have a good deal of experience with various color spaces and colormaps. Do you have an idea for a good "recipe" how to pick a curve in a given colorspace that leads to a satisfactory colormap? My first idea was to change the interpolating line to a circular arc passing through an "intermediate" color, but it's not clear to me whether there is any preferred "direction" for nudging the line into an arc. Also, most other colormaps, such as the examples "YlGnBu" and "cubehelix" which you mentioned, use more complicated curves than mere circular arcs (btw, kudos for your script - it's a great way of visualising these colormaps). I don't have enough knowledge yet to decide whether either approach is better. I've started toying with curved interpolations in my code but this is not quite ready to be pushed to Github yet. Anyway, if you have any suggestions I'd love to hear them. I also found a few more blog posts and papers which I hadn't seen before and which look extremely useful: (i) "Subtleties of color" http://earthobservatory.nasa.gov/blogs/elegantfigures/2013/08/05/subtleties-of-color-part-1-of-6/ A series of six blog posts with an excellent introduction to color theory and the issues around choosing colormaps. Well worth a read! It also suggests that CIE L*c*h* space (which uses the three variables lightness, chroma (saturation) and hue), may be a better choice than CIE L*a*b*, which I have been using so far. (ii) "How To Avoid Equidistant HSV Colors" http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/ Blog post with some interactive tools to visualise sections of CIE L*a*b* space and HCL (Hue-Chroma-Lightness) space. Here is a nice standalone version of the second tool: http://tristen.ca/hcl-picker/#/hlc/6/1/1B2531/E5FC74 (iii) "Generating Color Palettes using Intuitive Parameters" http://magnaview.nl/documents/MagnaView-M_Wijffelaars-Generating_color_palettes_using_intuitive_parameters.pdf Excellent-looking paper on the subject. I haven't read it in full yet but it looks like a great resource which might answer some of my questions above. At this stage I'm wondering how best to proceed. There seems to be huge number of resources and information, but we don't really have a clear path forward. I agree with Phil Elson's assessment when I talked to him at the Open Source Day: what we need is for someone to make a suggestion for a colormap and list a number of reasons why this particular one should be chosen. Then we have a basis for discussion and can argue about it. If anybody has such a suggestion yet, it would be great to hear about it (even if it is not perfect). Otherwise I'll try to make one once I have explored various options a bit more (although it may take a little while as my spare time is rather limited at the moment). Best wishes, Max |
From: Maximilian A. <max...@gm...> - 2015-01-08 22:20:20
|
Hi Federico, Thanks for trying it out and for the feedback! Indeed, I started out writing a simple IPython notebook along the lines you suggested, with just a couple of sliders and plots, but it quickly became too slow and unwieldy for quick explorations, hence the slightly more elaborate GUI. I agree that the reason for the 3D plot on the right may not be obvious at the moment. Personally, I find it useful to get a feel for what the representable colors in CIELab space (and the cross sections for L=const) look like, but when simply using a linear interpolation between two colors (as I'm doing at the moment) it may not be needed to visualise it in 3D. The reason I added it is that while playing around with the GUI I got the impression that my initial suggestion of using a simple linear interpolation between two colors may not result in the best-looking colormaps (this is confirmed by Nathaniel's reply). I'm currently toying with the option to use curved interpolations, and for thee it would be very useful IMHO to see what they look like in 3D. Btw, I have refactored my code a bit and it should be easy to write a simpler UI (e.g. in an IPython notebook) which doesn't need the other dependencies (also, I could drop the wxpython dependency because some conflict with Vispy which I had experienced seems to have disappeared). If you like, feel free to give it a shot to write a UI the way you imagine it. It's always good to have more options for exploration. :) Best wishes, Max 2015-01-08 17:44 GMT+00:00 Federico Ariza <ari...@gm...>: > Nice job. > > I find your GUI a little bit confusing (new to colormap stuff) but I > like the idea, basically I find it overkill, I would replace the gui > by a plot and a couple of slider widgets something simpler to > integrate without new dependencies. > Do you really need the third 3d plot on the right? > > On Mon, Jan 5, 2015 at 9:37 PM, Maximilian Albert > <max...@gm...> wrote: > > Happy new year everyone! > > > > Apologies for the long silence. I was snowed in with work before > Christmas > > and then mostly cut off from the internet for the past two weeks. > > Fortunately, I had a chance over the holidays to flesh out the GUI which > I > > mentioned in my previous email. You can find it here: > > > > https://github.com/maxalbert/colormap-selector > > > > Basically, it allows you to pick the start/end color of a colormap from > two > > cross sections in CIELab space and interpolates those colors linearly > (see > > the README file for more details). Currently there is one scatterplot to > > illustrate the resulting colormap but it can be trivially extended to > show > > more interesting sample plots. There are still a few things missing that > I'd > > like to add but at least it's in a state where it can be used and I'd be > > grateful for feedback, especially with regard to the colormaps generated > > with it (I do have some opinions myself but it would be interesting to > hear > > others' first). > > > > Regarding our ongoing discussion, I had a very useful chat with two > > colleagues before Christmas which spurred more thoughts. But I guess it's > > best to discuss them in a separate email when I'm less tired. ;) > > > > Best wishes, > > Max > > > > > ------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming! The Go Parallel Website, > > sponsored by Intel and developed in partnership with Slashdot Media, is > your > > hub for all things parallel software development, from weekly thought > > leadership blogs to news, videos, case studies, tutorials and more. Take > a > > look and join the conversation now. http://goparallel.sourceforge.net > > _______________________________________________ > > Matplotlib-devel mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > > > -- > Y yo que culpa tengo de que ellas se crean todo lo que yo les digo? > > -- Antonio Alducin -- > |
From: Drain, T. R (392P) <the...@jp...> - 2015-01-08 19:32:17
|
Let's say we want a time zone aware date time converter. The basic goal is to convert some input type (datetime) to the MPL internal type (float days past Jan 0, 0001). We also need to tell MPL how to format the axis (default formatter, locator, limits, label). - The convert() method takes the input type (datetime) and the xunits (or yunits) keyword argument and converts it to the MPL type. The axis input can be used to change the results depending on the plot type (polar plots always require radians for example). For the TZ converter, would take the input value (datetime), convert it to the time zone requested by the units input, then convert that to a float using dates.date2num(). Note that the input can be a sequence or a single value so the converter has to handle both cases. - The axisinfo() method is used to provide the default axis locator and formatter objects when the user creates a plot with this type. The axis input is useful here to handle the result differently for a polar plot. For the TZ converter, this would be exactly the same as the web docs - return the default locator and formatter for dates. Most of the time this method can just return standard MPL formatters and locators (for either dates or numbers). - The default_units() method provides a default value for the xunits or yunits keyword argument if one isn't specified. The default in this case might be "UTC". Hope that helps some, if you have more specific questions feel free to send them to me. Ted ________________________________ From: Thomas Caswell [tca...@gm...] Sent: Thursday, January 08, 2015 11:14 AM To: Drain, Theodore R (392P); mat...@li... Subject: Re: [matplotlib-devel] Date overhaul? I was hoping for something a bit more extensive of the intenals. I have tried to understand the units code a couple of times now and always hit a brick wall. On Thu Jan 08 2015 at 2:07:02 PM Drain, Theodore R (392P) <the...@jp...<mailto:the...@jp...>> wrote: Google search "matplotlib units" yields: http://matplotlib.org/api/units_api.html So it sounds like the update is to make MPL's internal date system higher resolution which would be great. We would just need to update our converters to convert to that format instead of the current floating point format. Our custom classes are not public (and can't really be made public) but they aren't very complicated so we can certainly talk about the implementation if that helps. ________________________________ From: Thomas Caswell [tca...@gm...<mailto:tca...@gm...>] Sent: Thursday, January 08, 2015 10:57 AM To: Drain, Theodore R (392P); mat...@li...<mailto:mat...@li...> Subject: Re: [matplotlib-devel] Date overhaul? One of the other driving factors to over-haul the default date handling is that floats do not have enough precision to deal with nano-second resolution data (which is what I think drove pandas to use datetime64). It sounds like the correct solution Is the unit framework documented anywhere and are those custom classes public? Tom On Thu Jan 08 2015 at 12:59:17 PM Drain, Theodore R (392P) <the...@jp...<mailto:the...@jp...>> wrote: I agree w/ the original poster that it would help to have a MEP to clearly define what the goals of the overhaul are Something else to keep in mind: we at least don't normally plot dates in "earth" based time systems. ~10 years ago we contracted with John Hunter to add the arbitrary unit system to MPL. This allows users to plot in their own data types and define a converter to handle the conversion to MPL types and labeling. We have our own "date time" like class which handles relativistic time scales (TDB, TT, TAI, GPS, Mars time, etc) at extremely high precision. We register a unit converter w/ MPL which allows our users to plot these types natively and use the xunits keyword (or yunits) to control how the plot looks. So we can do this: plot( x, y, xunits="GPS", yunits="km/s" ) plot( x, y, xunits="PST", yunits="mph" ) It would also be pretty easy to add a time zone aware unit converter with the existing MPL code which would allow you to do things w/ datetime like this: plot( x, y, xunits="UTC+8" ) plot( x, y, xunits="EST" ) I guess the point of this is to remind folks that not everyone plots dates in time zone based systems... Ted ________________________________ From: Chris Barker [chr...@no...<mailto:chr...@no...>] Sent: Thursday, January 08, 2015 9:00 AM To: mat...@li...<mailto:mat...@li...> Subject: Re: [matplotlib-devel] Date overhaul? On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...<mailto:sk...@po...>> wrote: I'm real naive about this stuff, but I have always wondered why matplotlib didn't just use datetime objects, or at least use timezone-aware datetime objects as an "interchange" format to get the timezone stuff right. Time zone handling is a pain in the %}€* And the definitions keep changing. So you need a complex DB and library that needs frequent updating. This is why neither the standard library nor numpy support time zone handling out of the box. But the datetime object does support a hook to add timezone info. The numpy datetime64 may implementation _may_ provide a similar hook in the future. There is the pytz package, which MPL could choose to depend on. But even that is a bit ugly--e.g. from the pytz docs: """Unfortunately using the tzinfo argument of the standard datetime constructors ‘’does not work’’ with pytz for many timezones.""" So my suggestion is that MPL punts, and stick with leaving time zone handling up to the user, I.e only use datetimes that are timezone "naive". What this means is that MPL would always a assume all datetimes interacting with each other are in the same time zone (including same DST status). Anyway, I'm being a bit lazy here, so I may be wrong, but I think the issue at hand is that MPL currently uses a float array to store and manipulate datetimes, and the thought is that it may be better to use numpy datetime64 arrays -- that would give us more consistent precision, and less code to convert to/from various datetime formats. I'm a bit on the fence about whether it's time to do it, as datetime64 does have issues with the locale timezone, but as any implementation would want to work with not-just-the-latest numpy anyway, it may make sense to start now. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...<mailto:Chr...@no...> ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net_______________________________________________ Matplotlib-devel mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net_______________________________________________ Matplotlib-devel mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |
From: Thomas C. <tca...@gm...> - 2015-01-08 19:14:37
|
I was hoping for something a bit more extensive of the intenals. I have tried to understand the units code a couple of times now and always hit a brick wall. On Thu Jan 08 2015 at 2:07:02 PM Drain, Theodore R (392P) < the...@jp...> wrote: > Google search "matplotlib units" yields: > http://matplotlib.org/api/units_api.html > > > > So it sounds like the update is to make MPL's internal date system higher > resolution which would be great. We would just need to update our > converters to convert to that format instead of the current floating point > format. Our custom classes are not public (and can't really be made > public) but they aren't very complicated so we can certainly talk about the > implementation if that helps. > > > ------------------------------ > *From:* Thomas Caswell [tca...@gm...] > *Sent:* Thursday, January 08, 2015 10:57 AM > *To:* Drain, Theodore R (392P); mat...@li... > > *Subject:* Re: [matplotlib-devel] Date overhaul? > One of the other driving factors to over-haul the default date handling > is that floats do not have enough precision to deal with nano-second > resolution data (which is what I think drove pandas to use datetime64). > > It sounds like the correct solution > > Is the unit framework documented anywhere and are those custom classes > public? > > Tom > > On Thu Jan 08 2015 at 12:59:17 PM Drain, Theodore R (392P) < > the...@jp...> wrote: > >> I agree w/ the original poster that it would help to have a MEP to >> clearly define what the goals of the overhaul are >> >> >> >> Something else to keep in mind: we at least don't normally plot dates in >> "earth" based time systems. ~10 years ago we contracted with John Hunter >> to add the arbitrary unit system to MPL. This allows users to plot in >> their own data types and define a converter to handle the conversion to MPL >> types and labeling. We have our own "date time" like class which handles >> relativistic time scales (TDB, TT, TAI, GPS, Mars time, etc) at extremely >> high precision. We register a unit converter w/ MPL which allows our users >> to plot these types natively and use the xunits keyword (or yunits) to >> control how the plot looks. So we can do this: >> >> >> >> plot( x, y, xunits="GPS", yunits="km/s" ) >> >> plot( x, y, xunits="PST", yunits="mph" ) >> >> >> >> It would also be pretty easy to add a time zone aware unit converter with >> the existing MPL code which would allow you to do things w/ datetime like >> this: >> >> >> >> plot( x, y, xunits="UTC+8" ) >> >> plot( x, y, xunits="EST" ) >> >> >> >> I guess the point of this is to remind folks that not everyone plots >> dates in time zone based systems... >> >> >> >> Ted >> >> >> ------------------------------ >> *From:* Chris Barker [chr...@no...] >> *Sent:* Thursday, January 08, 2015 9:00 AM >> *To:* mat...@li... >> *Subject:* Re: [matplotlib-devel] Date overhaul? >> >> On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...> >> wrote: >> >>> I'm real naive about this stuff, but I have always wondered why >>> matplotlib didn't just use datetime objects, or at least use >>> timezone-aware datetime objects as an "interchange" format to get the >>> timezone stuff right. >>> >> >> Time zone handling is a pain in the %}€* >> >> And the definitions keep changing. >> >> So you need a complex DB and library that needs frequent updating. >> >> This is why neither the standard library nor numpy support time zone >> handling out of the box. >> >> But the datetime object does support a hook to add timezone info. >> >> The numpy datetime64 may implementation _may_ provide a similar hook >> in the future. >> >> There is the pytz package, which MPL could choose to depend on. >> >> But even that is a bit ugly--e.g. from the pytz docs: >> >> """Unfortunately using the tzinfo argument of the standard datetime >> constructors ‘’does not work’’ with pytz for many timezones.""" >> >> So my suggestion is that MPL punts, and stick with leaving time zone >> handling up to the user, I.e only use datetimes that are timezone "naive". >> What this means is that MPL would always a assume all datetimes interacting >> with each other are in the same time zone (including same DST status). >> >> Anyway, I'm being a bit lazy here, so I may be wrong, but I think the >> issue at hand is that MPL currently uses a float array to store and >> manipulate datetimes, and the thought is that it may be better to use >> numpy datetime64 arrays -- that would give us more consistent precision, >> and less code to convert to/from various datetime formats. >> I'm a bit on the fence about whether it's time to do it, as datetime64 >> does have issues with the locale timezone, but as any implementation would >> want to work with not-just-the-latest numpy anyway, it may make sense to >> start now. >> >> -Chris >> >> >> >> >> >> >> -- >> >> Christopher Barker, Ph.D. >> Oceanographer >> >> Emergency Response Division >> NOAA/NOS/OR&R (206) 526-6959 voice >> 7600 Sand Point Way NE (206) 526-6329 fax >> Seattle, WA 98115 (206) 526-6317 main reception >> >> Chr...@no... >> ------------------------------------------------------------ >> ------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >> > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: Drain, T. R (392P) <the...@jp...> - 2015-01-08 19:06:26
|
Google search "matplotlib units" yields: http://matplotlib.org/api/units_api.html So it sounds like the update is to make MPL's internal date system higher resolution which would be great. We would just need to update our converters to convert to that format instead of the current floating point format. Our custom classes are not public (and can't really be made public) but they aren't very complicated so we can certainly talk about the implementation if that helps. ________________________________ From: Thomas Caswell [tca...@gm...] Sent: Thursday, January 08, 2015 10:57 AM To: Drain, Theodore R (392P); mat...@li... Subject: Re: [matplotlib-devel] Date overhaul? One of the other driving factors to over-haul the default date handling is that floats do not have enough precision to deal with nano-second resolution data (which is what I think drove pandas to use datetime64). It sounds like the correct solution Is the unit framework documented anywhere and are those custom classes public? Tom On Thu Jan 08 2015 at 12:59:17 PM Drain, Theodore R (392P) <the...@jp...<mailto:the...@jp...>> wrote: I agree w/ the original poster that it would help to have a MEP to clearly define what the goals of the overhaul are Something else to keep in mind: we at least don't normally plot dates in "earth" based time systems. ~10 years ago we contracted with John Hunter to add the arbitrary unit system to MPL. This allows users to plot in their own data types and define a converter to handle the conversion to MPL types and labeling. We have our own "date time" like class which handles relativistic time scales (TDB, TT, TAI, GPS, Mars time, etc) at extremely high precision. We register a unit converter w/ MPL which allows our users to plot these types natively and use the xunits keyword (or yunits) to control how the plot looks. So we can do this: plot( x, y, xunits="GPS", yunits="km/s" ) plot( x, y, xunits="PST", yunits="mph" ) It would also be pretty easy to add a time zone aware unit converter with the existing MPL code which would allow you to do things w/ datetime like this: plot( x, y, xunits="UTC+8" ) plot( x, y, xunits="EST" ) I guess the point of this is to remind folks that not everyone plots dates in time zone based systems... Ted ________________________________ From: Chris Barker [chr...@no...<mailto:chr...@no...>] Sent: Thursday, January 08, 2015 9:00 AM To: mat...@li...<mailto:mat...@li...> Subject: Re: [matplotlib-devel] Date overhaul? On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...<mailto:sk...@po...>> wrote: I'm real naive about this stuff, but I have always wondered why matplotlib didn't just use datetime objects, or at least use timezone-aware datetime objects as an "interchange" format to get the timezone stuff right. Time zone handling is a pain in the %}€* And the definitions keep changing. So you need a complex DB and library that needs frequent updating. This is why neither the standard library nor numpy support time zone handling out of the box. But the datetime object does support a hook to add timezone info. The numpy datetime64 may implementation _may_ provide a similar hook in the future. There is the pytz package, which MPL could choose to depend on. But even that is a bit ugly--e.g. from the pytz docs: """Unfortunately using the tzinfo argument of the standard datetime constructors ‘’does not work’’ with pytz for many timezones.""" So my suggestion is that MPL punts, and stick with leaving time zone handling up to the user, I.e only use datetimes that are timezone "naive". What this means is that MPL would always a assume all datetimes interacting with each other are in the same time zone (including same DST status). Anyway, I'm being a bit lazy here, so I may be wrong, but I think the issue at hand is that MPL currently uses a float array to store and manipulate datetimes, and the thought is that it may be better to use numpy datetime64 arrays -- that would give us more consistent precision, and less code to convert to/from various datetime formats. I'm a bit on the fence about whether it's time to do it, as datetime64 does have issues with the locale timezone, but as any implementation would want to work with not-just-the-latest numpy anyway, it may make sense to start now. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...<mailto:Chr...@no...> ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net_______________________________________________ Matplotlib-devel mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |
From: Thomas C. <tca...@gm...> - 2015-01-08 18:57:23
|
One of the other driving factors to over-haul the default date handling is that floats do not have enough precision to deal with nano-second resolution data (which is what I think drove pandas to use datetime64). It sounds like the correct solution Is the unit framework documented anywhere and are those custom classes public? Tom On Thu Jan 08 2015 at 12:59:17 PM Drain, Theodore R (392P) < the...@jp...> wrote: > I agree w/ the original poster that it would help to have a MEP to > clearly define what the goals of the overhaul are > > > > Something else to keep in mind: we at least don't normally plot dates in > "earth" based time systems. ~10 years ago we contracted with John Hunter > to add the arbitrary unit system to MPL. This allows users to plot in > their own data types and define a converter to handle the conversion to MPL > types and labeling. We have our own "date time" like class which handles > relativistic time scales (TDB, TT, TAI, GPS, Mars time, etc) at extremely > high precision. We register a unit converter w/ MPL which allows our users > to plot these types natively and use the xunits keyword (or yunits) to > control how the plot looks. So we can do this: > > > > plot( x, y, xunits="GPS", yunits="km/s" ) > > plot( x, y, xunits="PST", yunits="mph" ) > > > > It would also be pretty easy to add a time zone aware unit converter with > the existing MPL code which would allow you to do things w/ datetime like > this: > > > > plot( x, y, xunits="UTC+8" ) > > plot( x, y, xunits="EST" ) > > > > I guess the point of this is to remind folks that not everyone plots dates > in time zone based systems... > > > > Ted > > > ------------------------------ > *From:* Chris Barker [chr...@no...] > *Sent:* Thursday, January 08, 2015 9:00 AM > *To:* mat...@li... > *Subject:* Re: [matplotlib-devel] Date overhaul? > > On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...> wrote: > >> I'm real naive about this stuff, but I have always wondered why >> matplotlib didn't just use datetime objects, or at least use >> timezone-aware datetime objects as an "interchange" format to get the >> timezone stuff right. >> > > Time zone handling is a pain in the %}€* > > And the definitions keep changing. > > So you need a complex DB and library that needs frequent updating. > > This is why neither the standard library nor numpy support time zone > handling out of the box. > > But the datetime object does support a hook to add timezone info. > > The numpy datetime64 may implementation _may_ provide a similar hook > in the future. > > There is the pytz package, which MPL could choose to depend on. > > But even that is a bit ugly--e.g. from the pytz docs: > > """Unfortunately using the tzinfo argument of the standard datetime > constructors ‘’does not work’’ with pytz for many timezones.""" > > So my suggestion is that MPL punts, and stick with leaving time zone > handling up to the user, I.e only use datetimes that are timezone "naive". > What this means is that MPL would always a assume all datetimes interacting > with each other are in the same time zone (including same DST status). > > Anyway, I'm being a bit lazy here, so I may be wrong, but I think the > issue at hand is that MPL currently uses a float array to store and > manipulate datetimes, and the thought is that it may be better to use > numpy datetime64 arrays -- that would give us more consistent precision, > and less code to convert to/from various datetime formats. > I'm a bit on the fence about whether it's time to do it, as datetime64 > does have issues with the locale timezone, but as any implementation would > want to work with not-just-the-latest numpy anyway, it may make sense to > start now. > > -Chris > > > > > > > -- > > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chr...@no... > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: Drain, T. R (392P) <the...@jp...> - 2015-01-08 17:58:38
|
I agree w/ the original poster that it would help to have a MEP to clearly define what the goals of the overhaul are Something else to keep in mind: we at least don't normally plot dates in "earth" based time systems. ~10 years ago we contracted with John Hunter to add the arbitrary unit system to MPL. This allows users to plot in their own data types and define a converter to handle the conversion to MPL types and labeling. We have our own "date time" like class which handles relativistic time scales (TDB, TT, TAI, GPS, Mars time, etc) at extremely high precision. We register a unit converter w/ MPL which allows our users to plot these types natively and use the xunits keyword (or yunits) to control how the plot looks. So we can do this: plot( x, y, xunits="GPS", yunits="km/s" ) plot( x, y, xunits="PST", yunits="mph" ) It would also be pretty easy to add a time zone aware unit converter with the existing MPL code which would allow you to do things w/ datetime like this: plot( x, y, xunits="UTC+8" ) plot( x, y, xunits="EST" ) I guess the point of this is to remind folks that not everyone plots dates in time zone based systems... Ted ________________________________ From: Chris Barker [chr...@no...] Sent: Thursday, January 08, 2015 9:00 AM To: mat...@li... Subject: Re: [matplotlib-devel] Date overhaul? On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...<mailto:sk...@po...>> wrote: I'm real naive about this stuff, but I have always wondered why matplotlib didn't just use datetime objects, or at least use timezone-aware datetime objects as an "interchange" format to get the timezone stuff right. Time zone handling is a pain in the %}€* And the definitions keep changing. So you need a complex DB and library that needs frequent updating. This is why neither the standard library nor numpy support time zone handling out of the box. But the datetime object does support a hook to add timezone info. The numpy datetime64 may implementation _may_ provide a similar hook in the future. There is the pytz package, which MPL could choose to depend on. But even that is a bit ugly--e.g. from the pytz docs: """Unfortunately using the tzinfo argument of the standard datetime constructors ‘’does not work’’ with pytz for many timezones.""" So my suggestion is that MPL punts, and stick with leaving time zone handling up to the user, I.e only use datetimes that are timezone "naive". What this means is that MPL would always a assume all datetimes interacting with each other are in the same time zone (including same DST status). Anyway, I'm being a bit lazy here, so I may be wrong, but I think the issue at hand is that MPL currently uses a float array to store and manipulate datetimes, and the thought is that it may be better to use numpy datetime64 arrays -- that would give us more consistent precision, and less code to convert to/from various datetime formats. I'm a bit on the fence about whether it's time to do it, as datetime64 does have issues with the locale timezone, but as any implementation would want to work with not-just-the-latest numpy anyway, it may make sense to start now. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...<mailto:Chr...@no...> |
From: Nathaniel S. <nj...@po...> - 2015-01-08 17:54:55
|
On Tue, Jan 6, 2015 at 2:37 AM, Maximilian Albert <max...@gm...> wrote: > Happy new year everyone! > > Apologies for the long silence. I was snowed in with work before Christmas > and then mostly cut off from the internet for the past two weeks. > Fortunately, I had a chance over the holidays to flesh out the GUI which I > mentioned in my previous email. You can find it here: > > https://github.com/maxalbert/colormap-selector > > Basically, it allows you to pick the start/end color of a colormap from two > cross sections in CIELab space and interpolates those colors linearly (see > the README file for more details). There's a downside to this approach for the kinds of colormaps we've been talking about in this thread, where we want both a large lightness range plus a colorful result. The problem is that the way color space is shaped, you can't simultaneously have both high saturation (colorfulness) *and* high/low lightness. So if you pick your extreme points to be near black and white, then they can only have a slight tinting of color, and then if you linearly interpolate between these, then you end up with slightly tinted greyscale. Colormaps like YlGnBu or cubehelix or parula are designed to start out with low saturation, then as they move into the middle of the lightness scale they arc outwards, then arc back in again. This is a lot easier to visualize (e.g. by playing with the script I posted upthread) than it is to explain in text :-). Like, if you do viscm(YlGnBu_r) and look at the plot in the lower-right then it's clear that it's not a simple straight line in (J'/K, a', b') space (which is a higher-tech analogue to L* a* b* space). -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org |
From: Federico A. <ari...@gm...> - 2015-01-08 17:44:32
|
Nice job. I find your GUI a little bit confusing (new to colormap stuff) but I like the idea, basically I find it overkill, I would replace the gui by a plot and a couple of slider widgets something simpler to integrate without new dependencies. Do you really need the third 3d plot on the right? On Mon, Jan 5, 2015 at 9:37 PM, Maximilian Albert <max...@gm...> wrote: > Happy new year everyone! > > Apologies for the long silence. I was snowed in with work before Christmas > and then mostly cut off from the internet for the past two weeks. > Fortunately, I had a chance over the holidays to flesh out the GUI which I > mentioned in my previous email. You can find it here: > > https://github.com/maxalbert/colormap-selector > > Basically, it allows you to pick the start/end color of a colormap from two > cross sections in CIELab space and interpolates those colors linearly (see > the README file for more details). Currently there is one scatterplot to > illustrate the resulting colormap but it can be trivially extended to show > more interesting sample plots. There are still a few things missing that I'd > like to add but at least it's in a state where it can be used and I'd be > grateful for feedback, especially with regard to the colormaps generated > with it (I do have some opinions myself but it would be interesting to hear > others' first). > > Regarding our ongoing discussion, I had a very useful chat with two > colleagues before Christmas which spurred more thoughts. But I guess it's > best to discuss them in a separate email when I'm less tired. ;) > > Best wishes, > Max > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Y yo que culpa tengo de que ellas se crean todo lo que yo les digo? -- Antonio Alducin -- |
From: Chris B. <chr...@no...> - 2015-01-08 17:01:20
|
On Thu, Jan 8, 2015 at 7:04 AM, Skip Montanaro <sk...@po...> wrote: > I'm real naive about this stuff, but I have always wondered why > matplotlib didn't just use datetime objects, or at least use > timezone-aware datetime objects as an "interchange" format to get the > timezone stuff right. > Time zone handling is a pain in the %}€* And the definitions keep changing. So you need a complex DB and library that needs frequent updating. This is why neither the standard library nor numpy support time zone handling out of the box. But the datetime object does support a hook to add timezone info. The numpy datetime64 may implementation _may_ provide a similar hook in the future. There is the pytz package, which MPL could choose to depend on. But even that is a bit ugly--e.g. from the pytz docs: """Unfortunately using the tzinfo argument of the standard datetime constructors ‘’does not work’’ with pytz for many timezones.""" So my suggestion is that MPL punts, and stick with leaving time zone handling up to the user, I.e only use datetimes that are timezone "naive". What this means is that MPL would always a assume all datetimes interacting with each other are in the same time zone (including same DST status). Anyway, I'm being a bit lazy here, so I may be wrong, but I think the issue at hand is that MPL currently uses a float array to store and manipulate datetimes, and the thought is that it may be better to use numpy datetime64 arrays -- that would give us more consistent precision, and less code to convert to/from various datetime formats. I'm a bit on the fence about whether it's time to do it, as datetime64 does have issues with the locale timezone, but as any implementation would want to work with not-just-the-latest numpy anyway, it may make sense to start now. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Skip M. <sk...@po...> - 2015-01-08 15:04:24
|
I'm real naive about this stuff, but I have always wondered why matplotlib didn't just use datetime objects, or at least use timezone-aware datetime objects as an "interchange" format to get the timezone stuff right. Skip |
From: Chris B. <chr...@no...> - 2015-01-08 00:57:43
|
On Wed, Jan 7, 2015 at 2:10 PM, Eric Firing <ef...@ha...> wrote: > One thing that has held this up is that datetime64 > came into numpy half-baked, and has remained experimental with known > problems that need to be fixed. It looks like the core of datetime64, > ignoring timezone problems, isn't going to change, so it should be > possible to work with that in matplotlib. > you can do some googling, but the issue with timezones in datetime64 is that is _always_ uses the system timezone to translate when parsing iso strings (and bare datetime.datetime objects) without a timezone, and I'm pretty sure does somethign like that when formatting string output, too. It can be worked around if you are careful to always make it think you are working in UTC. This should change in a release or two (and I'm sorry to say that I've held that up by stalling on getting proposals properly written up), but Eric's right, the internals should stay close enough that it's worth using. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Eric F. <ef...@ha...> - 2015-01-07 22:10:14
|
On 2015/01/07 11:48 AM, Paul Ganssle wrote: > Recently I took a crack at fixing some of the bugs in dates.py, and it > seems like there's been some talk of overhauling how dates are handled. > I don't see an MEP for that, so I'm wondering if anyone can give me some > more details about what the impetus was for overhauling date handling > and just in general what needs to be done. I wouldn't mind taking a > crack at the date handling stuff while it's still fresh in my mind. Paul, I think the main thing is supporting, and taking advantage of, the numpy datetime64 dtype. One thing that has held this up is that datetime64 came into numpy half-baked, and has remained experimental with known problems that need to be fixed. It looks like the core of datetime64, ignoring timezone problems, isn't going to change, so it should be possible to work with that in matplotlib. Eric |
From: Paul G. <pga...@gm...> - 2015-01-07 21:48:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Recently I took a crack at fixing some of the bugs in dates.py, and it seems like there's been some talk of overhauling how dates are handled. I don't see an MEP for that, so I'm wondering if anyone can give me some more details about what the impetus was for overhauling date handling and just in general what needs to be done. I wouldn't mind taking a crack at the date handling stuff while it's still fresh in my mind. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJUramTAAoJEM1U/OPZZL77t4kP/1Gj2roe2ZzGJF3u2L71p+TD gK63EKcoqLnjCs080nDfsERSSN8tG0OQvCLNcxQBV7p22rd6lMdn5MvHxYKuZVEE rD2+92f45Ql5gAw+Q8rOJKcIt/fH0MHDO5TPCJl1Mjcp1ZsQk2DO/qdOmPWlgjbg H++WWW6kXbJpBBWelNzKCR6HIhFfcEtBCNoc0MDclLm7qlxR6vGoFNBWeNptEjQ+ 4q6ZASMfIxkRKI1KpiYW+3ezMGCyw9hd/aJvj9iSti5BXL0CZHfUg1Rt7gYpsHU4 I0gSFzSIOTQb8TjKpyeD3yjxmllxgaXxdUm5i3Snp0+Cv7yWYYwAArTm/Aq6h2+z X4qaXNxys5BKqOa+oCiYLdlE/GHA+REvw4+VFoL/oOp5wVlGjaJY2jwhjhJnjvzT f4tvampwFfl0KPAm+eoqkMhqt/jjZetKwXXK+DTETO9o80yvTaM28nd1LYLD9ywN QDfVbCzrg01cQQpWVT5JtzeHoJ/4du8I+cC0VWzMM159X44GfYbtV1QUbRgdiTPh TUwDJi48Zg3eVI45L95r1eC4Q8VFzkTf59m1wve7xuVkOgNZq15BriQC7TQWWKH6 RXjTYD09PRmTyZg4YeshqLHApyAXzFYtSckHDiEFy6BPTYHsgPQcbX0U1igZUsrA 9rHjCWUZK33cLbla2CpG =RJbm -----END PGP SIGNATURE----- |
From: Paul H. <pmh...@gm...> - 2015-01-06 05:11:56
|
Tony! This is very cool. Bravo. On Mon, Jan 5, 2015 at 8:42 PM, Tony Yu <ts...@gm...> wrote: > I've been playing around with learning Javascript lately. As part of the > process, I created a Flask app to build a gallery for matplotlib style > sheets: > > https://github.com/tonysyu/matplotlib-style-gallery > > If you run that locally, you can actually input styles, either with a URL > to a *.mplstyle file or with matplotlibrc commands. Here's a static version > without the custom inputs: > > http://tonysyu.github.io/raw_content/matplotlib-style-gallery/gallery.html > > Ideally, I'd get this into a form that could be submitted as a PR for the > matplotlib website, but I'll need a bit more spare time to learn some more > web development (sessions, client storage, etc). > > Cheers! > -Tony > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > |
From: Tony Yu <ts...@gm...> - 2015-01-06 04:42:54
|
I've been playing around with learning Javascript lately. As part of the process, I created a Flask app to build a gallery for matplotlib style sheets: https://github.com/tonysyu/matplotlib-style-gallery If you run that locally, you can actually input styles, either with a URL to a *.mplstyle file or with matplotlibrc commands. Here's a static version without the custom inputs: http://tonysyu.github.io/raw_content/matplotlib-style-gallery/gallery.html Ideally, I'd get this into a form that could be submitted as a PR for the matplotlib website, but I'll need a bit more spare time to learn some more web development (sessions, client storage, etc). Cheers! -Tony |
From: Maximilian A. <max...@gm...> - 2015-01-06 02:37:59
|
Happy new year everyone! Apologies for the long silence. I was snowed in with work before Christmas and then mostly cut off from the internet for the past two weeks. Fortunately, I had a chance over the holidays to flesh out the GUI which I mentioned in my previous email. You can find it here: https://github.com/maxalbert/colormap-selector Basically, it allows you to pick the start/end color of a colormap from two cross sections in CIELab space and interpolates those colors linearly (see the README file for more details). Currently there is one scatterplot to illustrate the resulting colormap but it can be trivially extended to show more interesting sample plots. There are still a few things missing that I'd like to add but at least it's in a state where it can be used and I'd be grateful for feedback, especially with regard to the colormaps generated with it (I do have some opinions myself but it would be interesting to hear others' first). Regarding our ongoing discussion, I had a very useful chat with two colleagues before Christmas which spurred more thoughts. But I guess it's best to discuss them in a separate email when I'm less tired. ;) Best wishes, Max |
From: Amit S. <ami...@gm...> - 2015-01-01 10:17:14
|
On Wed, Dec 31, 2014 at 4:53 AM, Benjamin Root <ben...@ou...> wrote: > There is no better way to do this at the moment. There have been talk of > integrating the animation interface into Figure objects so that creating an > animation would be similar to creating any other type of plot, with > references to the animation object stored in the figure like any other > Artist. > > The basic rule of thumb is, if you are using a constructor, then assign the > constructed object somewhere! Thanks a lot Benjamin! Very helpful indeed. > > I hope that clears it up! > Ben Root > > > On Sun, Dec 28, 2014 at 7:25 AM, Amit Saha <ami...@gm...> wrote: >> >> Hi all, >> >> I realize that once I create a FuncAnimation object, I must assign it >> to a label to make it persist [1]. Is this going to remain the case in >> the foreseeable future? Is there a better way of doing this now? >> >> Thanks, >> Amit. >> >> >> [1] https://github.com/matplotlib/matplotlib/issues/1656 >> >> -- >> http://echorand.me >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > -- http://echorand.me |