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
(14) |
2
(6) |
3
(10) |
4
(3) |
5
(2) |
6
(3) |
7
(21) |
8
|
9
|
10
(4) |
11
(2) |
12
(8) |
13
(17) |
14
(9) |
15
(5) |
16
(3) |
17
|
18
(10) |
19
(11) |
20
(3) |
21
(11) |
22
(1) |
23
|
24
(2) |
25
|
26
(3) |
27
(6) |
28
|
29
|
30
|
|
|
|
|
|
|
From: Maria L. <li...@us...> - 2014-11-21 22:21:02
|
Thank you for the note, but it is definitely many more extra cells than just one around the border. Especially bounding area on the east side of the state is affected the most. Thanks, Masha On Nov 21, 2014, at 11:31 AM, Benjamin Root <ben...@ou...<mailto:ben...@ou...>> wrote: How many cells past the state boundary are you seeing? If it is never more than one cell past the boundary, it might be an offset issue. On Fri, Nov 21, 2014 at 1:30 PM, Maria Liukis <li...@us...<mailto:li...@us...>> wrote: Eric, Yes, my data is exactly how you understood it. I thought, as you are suggesting, to create a masked array for rectangle that bounds state of CA, to be used with pcolormesh(). The only existing functionality that I could find is griddata(), but it also interpolates data to extra cells outside of my CA grid (even with method=‘nearest’ to extra cells within the convex hull). It looks like I have to “map” my CA grid to larger rectangular grid manually, I just wanted to check if such functionality already exists within matplotlib, numpy or scipy packages, and I am just not aware of it. I also could plot each cell with ax.add_patch(), but would imagine that it would be much slower. And thank you for mentioning basemap, I am using it for my maps :) Thank you very much for your response! Masha On Nov 21, 2014, at 6:54 AM, Eric Firing <ef...@ha...<mailto:ef...@ha...>> wrote: > On 2014/11/20, 7:11 PM, Maria Liukis wrote: >> Hello, >> >> I have a problem plotting data which is defined on a grid other than >> rectangular mesh, and would greatly appreciate any advise. My data is >> defined for 0.1degree grid for the state of California, and I don’t >> want to interpolate my data outside of the defined grid when plotting >> it. I used pcolormesh() function for rectangular area maps, but it >> only accepts rectangular grid and I was wondering if there is a >> simple solution to my problem. > > Masha, > > When you say your data "is defined for a 0.1 degree grid", that makes it > sound like it is on a quadrilateral grid, so there should be no problem > with using pcolormesh. Is it on 0.1 degree lon by 0.1 degree lat > points, but only for points within California? Then you can make a > masked array with this grid for a rectangle in which the points outside > California are masked, and the ones inside are set to your data values. > Your X and Y inputs to pcolormesh should be 2-D arrays with the > boundary values rather than the centers. It sounds like you would want > to do all this via mpl_toolkits.basemap.Basemap so that you will end up > with a properly proportioned and labeled map. > > Maybe I am misinterpreting your description of your data, however. > > Eric > >> >> The only solution I could find was to use >> scipy.interpolate,griddata() to “map” my grid to a bounding >> rectangular grid (bounding rectangle around CA state), but that would >> also interpolate my data to grid cells outside of CA state, which I >> don’t want to do. >> >> Many thanks for any hints! Masha -- li...@us...<mailto:li...@us...> >> >> >> > >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li...<mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li...<mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Benjamin R. <ben...@ou...> - 2014-11-21 19:32:06
|
How many cells past the state boundary are you seeing? If it is never more than one cell past the boundary, it might be an offset issue. On Fri, Nov 21, 2014 at 1:30 PM, Maria Liukis <li...@us...> wrote: > Eric, > > Yes, my data is exactly how you understood it. I thought, as you are > suggesting, to create a masked array for rectangle that bounds state of CA, > to be used with pcolormesh(). The only existing functionality that I could > find is griddata(), but it also interpolates data to extra cells outside of > my CA grid (even with method=‘nearest’ to extra cells within the convex > hull). It looks like I have to “map” my CA grid to larger rectangular grid > manually, I just wanted to check if such functionality already exists > within matplotlib, numpy or scipy packages, and I am just not aware of it. > > I also could plot each cell with ax.add_patch(), but would imagine that it > would be much slower. > > And thank you for mentioning basemap, I am using it for my maps :) > > Thank you very much for your response! > Masha > > > On Nov 21, 2014, at 6:54 AM, Eric Firing <ef...@ha...> wrote: > > > On 2014/11/20, 7:11 PM, Maria Liukis wrote: > >> Hello, > >> > >> I have a problem plotting data which is defined on a grid other than > >> rectangular mesh, and would greatly appreciate any advise. My data is > >> defined for 0.1degree grid for the state of California, and I don’t > >> want to interpolate my data outside of the defined grid when plotting > >> it. I used pcolormesh() function for rectangular area maps, but it > >> only accepts rectangular grid and I was wondering if there is a > >> simple solution to my problem. > > > > Masha, > > > > When you say your data "is defined for a 0.1 degree grid", that makes it > > sound like it is on a quadrilateral grid, so there should be no problem > > with using pcolormesh. Is it on 0.1 degree lon by 0.1 degree lat > > points, but only for points within California? Then you can make a > > masked array with this grid for a rectangle in which the points outside > > California are masked, and the ones inside are set to your data values. > > Your X and Y inputs to pcolormesh should be 2-D arrays with the > > boundary values rather than the centers. It sounds like you would want > > to do all this via mpl_toolkits.basemap.Basemap so that you will end up > > with a properly proportioned and labeled map. > > > > Maybe I am misinterpreting your description of your data, however. > > > > Eric > > > >> > >> The only solution I could find was to use > >> scipy.interpolate,griddata() to “map” my grid to a bounding > >> rectangular grid (bounding rectangle around CA state), but that would > >> also interpolate my data to grid cells outside of CA state, which I > >> don’t want to do. > >> > >> Many thanks for any hints! Masha -- li...@us... > >> > >> > >> > > > >> > ------------------------------------------------------------------------------ > >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards > >> with Interactivity, Sharing, Native Excel Exports, App Integration & > more > >> Get technology previously reserved for billion-dollar corporations, FREE > >> > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > > > > ------------------------------------------------------------------------------ > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > > with Interactivity, Sharing, Native Excel Exports, App Integration & more > > Get technology previously reserved for billion-dollar corporations, FREE > > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Maria L. <li...@us...> - 2014-11-21 18:30:11
|
Eric, Yes, my data is exactly how you understood it. I thought, as you are suggesting, to create a masked array for rectangle that bounds state of CA, to be used with pcolormesh(). The only existing functionality that I could find is griddata(), but it also interpolates data to extra cells outside of my CA grid (even with method=‘nearest’ to extra cells within the convex hull). It looks like I have to “map” my CA grid to larger rectangular grid manually, I just wanted to check if such functionality already exists within matplotlib, numpy or scipy packages, and I am just not aware of it. I also could plot each cell with ax.add_patch(), but would imagine that it would be much slower. And thank you for mentioning basemap, I am using it for my maps :) Thank you very much for your response! Masha On Nov 21, 2014, at 6:54 AM, Eric Firing <ef...@ha...> wrote: > On 2014/11/20, 7:11 PM, Maria Liukis wrote: >> Hello, >> >> I have a problem plotting data which is defined on a grid other than >> rectangular mesh, and would greatly appreciate any advise. My data is >> defined for 0.1degree grid for the state of California, and I don’t >> want to interpolate my data outside of the defined grid when plotting >> it. I used pcolormesh() function for rectangular area maps, but it >> only accepts rectangular grid and I was wondering if there is a >> simple solution to my problem. > > Masha, > > When you say your data "is defined for a 0.1 degree grid", that makes it > sound like it is on a quadrilateral grid, so there should be no problem > with using pcolormesh. Is it on 0.1 degree lon by 0.1 degree lat > points, but only for points within California? Then you can make a > masked array with this grid for a rectangle in which the points outside > California are masked, and the ones inside are set to your data values. > Your X and Y inputs to pcolormesh should be 2-D arrays with the > boundary values rather than the centers. It sounds like you would want > to do all this via mpl_toolkits.basemap.Basemap so that you will end up > with a properly proportioned and labeled map. > > Maybe I am misinterpreting your description of your data, however. > > Eric > >> >> The only solution I could find was to use >> scipy.interpolate,griddata() to “map” my grid to a bounding >> rectangular grid (bounding rectangle around CA state), but that would >> also interpolate my data to grid cells outside of CA state, which I >> don’t want to do. >> >> Many thanks for any hints! Masha -- li...@us... >> >> >> > >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Maria L. <li...@us...> - 2014-11-21 18:18:09
|
Thank you for the suggestion, unfortunately “nearest” method for interpolation still does interpolation to some extra cells outside of my CA grid which fall within the convex hull. I thought I check if there is existing functionality for that within matplotlib, but it seems that I have to manually “map” my grid to larger rectangular grid for plotting. Many thanks for your response! Masha -- li...@us...<mailto:li...@us...> On Nov 21, 2014, at 12:15 AM, Shahar Shani Kadmiel <ka...@po...<mailto:ka...@po...>> wrote: When using scipy.interpolate.griddada, you could use 'nearest' if your data is sufficiently dense. This will 'map' your grid onto whatever rectangular grid leaving grid points outside the convex hull of the original grid empty. Well, not empty but nan. If you do wish to interpolate your dada, you could mask the resulting rectangular grid post interpolation. — Sent from Mailbox<https://www.dropbox.com/mailbox> On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <li...@us...<mailto:li...@us...>> wrote: Hello, I have a problem plotting data which is defined on a grid other than rectangular mesh, and would greatly appreciate any advise. My data is defined for 0.1degree grid for the state of California, and I don’t want to interpolate my data outside of the defined grid when plotting it. I used pcolormesh() function for rectangular area maps, but it only accepts rectangular grid and I was wondering if there is a simple solution to my problem. The only solution I could find was to use scipy.interpolate,griddata() to “map” my grid to a bounding rectangular grid (bounding rectangle around CA state), but that would also interpolate my data to grid cells outside of CA state, which I don’t want to do. Many thanks for any hints! Masha -- li...@us...<mailto:li...@us...> ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Joe K. <jof...@gm...> - 2014-11-21 17:51:46
|
> > On Fri, Nov 21, 2014 at 10:42 AM, Pedro Marcal <ped...@gm...> > wrote: > @MariaLukis, I had to go through contortions to plot an arbitrary > quadrilateral mesh, in 3D. I resolved it by storing every line plotted and > retracing the best set to take me to the starting point of the quad I was > plotting. It would have been much easier if I had the function of lifting > my pen and move while not plotting. But then I did not know how to get > intpo matplotlib to perform what is a simple mod. > <...snip...> > First off, ``pcolormesh`` will happily plot arbitrary quadrilateral meshes, so long as you can describe the points in a regular manner. For example: import matplotlib.pyplot as plt import numpy as np shape = (10, 10) y, x = np.mgrid[:shape[0], :shape[1]] # Distort the grid so that it's no longer regular x = x + np.random.normal(0, 0.2, shape) y = y + np.random.normal(0, 0.2, shape) z = np.random.random(shape) fig, ax = plt.subplots() ax.pcolormesh(x, y, z) plt.show() Also, "lifting the pen while not plotting" is the basis of how paths are handled in matplotlib. Normally, you wouldn't drop down to this lower-level API very often, but it underpins a lot of higher-level matplotlib artists. For example, let's draw 4 squares with one path: import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.patches import PathPatch codes = Path.LINETO * np.ones(5, dtype=np.uint8) codes[0] = Path.MOVETO x = np.array([0, 1, 1, 0, 0]) y = np.array([0, 0, 1, 1, 0]) numsquares = 4 x = np.hstack([x + 2*i for i in range(numsquares)]) y = np.hstack([y + 2*i for i in range(numsquares)]) codes = np.hstack(numsquares * [codes]) path = Path(np.c_[x, y], codes) patch = PathPatch(path, facecolor='red') fig, ax = plt.subplots() ax.add_patch(patch) ax.autoscale() ax.axis('equal') ax.margins(0.05) plt.show() Hopefully those examples help a bit (or at least give food for thought). Cheers, -Joe |
From: Pedro M. <ped...@gm...> - 2014-11-21 16:42:34
|
@MariaLukis, I had to go through contortions to plot an arbitrary quadrilateral mesh, in 3D. I resolved it by storing every line plotted and retracing the best set to take me to the starting point of the quad I was plotting. It would have been much easier if I had the function of lifting my pen and move while not plotting. But then I did not know how to get intpo matplotlib to perform what is a simple mod. On Fri, Nov 21, 2014 at 6:54 AM, < mat...@li...> wrote: > Send Matplotlib-users mailing list submissions to > mat...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > or, via email, send a message with subject or body 'help' to > mat...@li... > > You can reach the person managing the list at > mat...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Matplotlib-users digest..." > > > Today's Topics: > > 1. How to plot other than rectangular grid? (Maria Liukis) > 2. Re: How to plot other than rectangular grid? (Thomas Caswell) > 3. Re: How to plot other than rectangular grid? > (Shahar Shani Kadmiel) > 4. Re: How to plot other than rectangular grid? (Oliver) > 5. Re: How to plot other than rectangular grid? (Eric Firing) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 21 Nov 2014 00:11:31 +0000 > From: Maria Liukis <li...@us...> > Subject: [Matplotlib-users] How to plot other than rectangular grid? > To: "mat...@li..." > <mat...@li...> > Message-ID: <503...@us...> > Content-Type: text/plain; charset="Windows-1252" > > Hello, > > I have a problem plotting data which is defined on a grid other than > rectangular mesh, and would greatly appreciate any advise. My data is > defined for 0.1degree grid for the state of California, and I don?t want to > interpolate my data outside of the defined grid when plotting it. I used > pcolormesh() function for rectangular area maps, but it only accepts > rectangular grid and I was wondering if there is a simple solution to my > problem. > > The only solution I could find was to use scipy.interpolate,griddata() to > ?map? my grid to a bounding rectangular grid (bounding rectangle around CA > state), but that would also interpolate my data to grid cells outside of CA > state, which I don?t want to do. > > Many thanks for any hints! > Masha > -- > li...@us... > > > > > > > ------------------------------ > > Message: 2 > Date: Fri, 21 Nov 2014 04:38:21 +0000 > From: Thomas Caswell <tca...@gm...> > Subject: Re: [Matplotlib-users] How to plot other than rectangular > grid? > To: Maria Liukis <li...@us...>, > "mat...@li..." > <mat...@li...> > Message-ID: > <CAA48SF86omwetH6jxKDbqo++TW= > JUw...@ma...> > Content-Type: text/plain; charset="utf-8" > > There are also triangular mesh plotting (I think tricolormesh is the > function name). > > The really brute force solution is to use poly collection and draw what > ever shape you want. > > Tom > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 3 > Date: Fri, 21 Nov 2014 00:15:58 -0800 (PST) > From: "Shahar Shani Kadmiel" <ka...@po...> > Subject: Re: [Matplotlib-users] How to plot other than rectangular > grid? > To: "Maria Liukis" <li...@us...> > Cc: mat...@li... > Message-ID: <1416557758097.b2298d67@Nodemailer> > Content-Type: text/plain; charset="utf-8" > > When using scipy.interpolate.griddada, you could use 'nearest' if your > data is sufficiently dense. This will 'map' your grid onto whatever > rectangular grid leaving grid points outside the convex hull of the > original grid empty. Well, not empty but nan.?If you do wish to interpolate > your dada, you could mask the resulting rectangular grid post > interpolation.? > > > ? > Sent from Mailbox > > On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <li...@us...> wrote: > > > Hello, > > I have a problem plotting data which is defined on a grid other than > rectangular mesh, and would greatly appreciate any advise. My data is > defined for 0.1degree grid for the state of California, and I don?t want to > interpolate my data outside of the defined grid when plotting it. I used > pcolormesh() function for rectangular area maps, but it only accepts > rectangular grid and I was wondering if there is a simple solution to my > problem. > > The only solution I could find was to use scipy.interpolate,griddata() > to ?map? my grid to a bounding rectangular grid (bounding rectangle around > CA state), but that would also interpolate my data to grid cells outside of > CA state, which I don?t want to do. > > Many thanks for any hints! > > Masha > > -- > > li...@us... > > > ------------------------------------------------------------------------------ > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > > with Interactivity, Sharing, Native Excel Exports, App Integration & more > > Get technology previously reserved for billion-dollar corporations, FREE > > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 4 > Date: Fri, 21 Nov 2014 14:13:03 +0100 > From: Oliver <oli...@gm...> > Subject: Re: [Matplotlib-users] How to plot other than rectangular > grid? > To: Shahar Shani Kadmiel <ka...@po...> > Cc: "mat...@li..." > <mat...@li...> > Message-ID: > <CAEqQaNBqU4dDxQD0PTQXh= > J23...@ma...> > Content-Type: text/plain; charset="utf-8" > > As Thomas Caswell said, check out the "tri..." functions. No need for > interpolation. This question recently reappeared on Stackoverflow and was > answered there as well: > > https://stackoverflow.com/questions/27004422/contour-imshow-plot-for-irregular-x-y-z-data > > 2014-11-21 9:15 GMT+01:00 Shahar Shani Kadmiel <ka...@po...>: > > > When using scipy.interpolate.griddada, you could use 'nearest' if your > > data is sufficiently dense. This will 'map' your grid onto whatever > > rectangular grid leaving grid points outside the convex hull of the > > original grid empty. Well, not empty but nan. > > If you do wish to interpolate your dada, you could mask the resulting > > rectangular grid post interpolation. > > > > ? > > Sent from Mailbox <https://www.dropbox.com/mailbox> > > > > > > On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <li...@us...> wrote: > > > >> Hello, > >> > >> I have a problem plotting data which is defined on a grid other than > >> rectangular mesh, and would greatly appreciate any advise. My data is > >> defined for 0.1degree grid for the state of California, and I don?t > want to > >> interpolate my data outside of the defined grid when plotting it. I used > >> pcolormesh() function for rectangular area maps, but it only accepts > >> rectangular grid and I was wondering if there is a simple solution to my > >> problem. > >> > >> The only solution I could find was to use scipy.interpolate,griddata() > to > >> ?map? my grid to a bounding rectangular grid (bounding rectangle around > CA > >> state), but that would also interpolate my data to grid cells outside > of CA > >> state, which I don?t want to do. > >> > >> Many thanks for any hints! > >> Masha > >> -- > >> li...@us... > >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> > >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards > >> with Interactivity, Sharing, Native Excel Exports, App Integration & > more > >> Get technology previously reserved for billion-dollar corporations, FREE > >> > >> > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > > > > > > ------------------------------------------------------------------------------ > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > > with Interactivity, Sharing, Native Excel Exports, App Integration & more > > Get technology previously reserved for billion-dollar corporations, FREE > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 5 > Date: Fri, 21 Nov 2014 09:54:29 -0500 > From: Eric Firing <ef...@ha...> > Subject: Re: [Matplotlib-users] How to plot other than rectangular > grid? > To: mat...@li... > Message-ID: <546...@ha...> > Content-Type: text/plain; charset=windows-1252; format=flowed > > On 2014/11/20, 7:11 PM, Maria Liukis wrote: > > Hello, > > > > I have a problem plotting data which is defined on a grid other than > > rectangular mesh, and would greatly appreciate any advise. My data is > > defined for 0.1degree grid for the state of California, and I don?t > > want to interpolate my data outside of the defined grid when plotting > > it. I used pcolormesh() function for rectangular area maps, but it > > only accepts rectangular grid and I was wondering if there is a > > simple solution to my problem. > > Masha, > > When you say your data "is defined for a 0.1 degree grid", that makes it > sound like it is on a quadrilateral grid, so there should be no problem > with using pcolormesh. Is it on 0.1 degree lon by 0.1 degree lat > points, but only for points within California? Then you can make a > masked array with this grid for a rectangle in which the points outside > California are masked, and the ones inside are set to your data values. > Your X and Y inputs to pcolormesh should be 2-D arrays with the > boundary values rather than the centers. It sounds like you would want > to do all this via mpl_toolkits.basemap.Basemap so that you will end up > with a properly proportioned and labeled map. > > Maybe I am misinterpreting your description of your data, however. > > Eric > > > > > The only solution I could find was to use > > scipy.interpolate,griddata() to ?map? my grid to a bounding > > rectangular grid (bounding rectangle around CA state), but that would > > also interpolate my data to grid cells outside of CA state, which I > > don?t want to do. > > > > Many thanks for any hints! Masha -- li...@us... > > > > > > > > > > ------------------------------------------------------------------------------ > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > > with Interactivity, Sharing, Native Excel Exports, App Integration & more > > Get technology previously reserved for billion-dollar corporations, FREE > > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > ------------------------------ > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > ------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > End of Matplotlib-users Digest, Vol 102, Issue 39 > ************************************************* > |
From: Eric F. <ef...@ha...> - 2014-11-21 14:54:38
|
On 2014/11/20, 7:11 PM, Maria Liukis wrote: > Hello, > > I have a problem plotting data which is defined on a grid other than > rectangular mesh, and would greatly appreciate any advise. My data is > defined for 0.1degree grid for the state of California, and I don’t > want to interpolate my data outside of the defined grid when plotting > it. I used pcolormesh() function for rectangular area maps, but it > only accepts rectangular grid and I was wondering if there is a > simple solution to my problem. Masha, When you say your data "is defined for a 0.1 degree grid", that makes it sound like it is on a quadrilateral grid, so there should be no problem with using pcolormesh. Is it on 0.1 degree lon by 0.1 degree lat points, but only for points within California? Then you can make a masked array with this grid for a rectangle in which the points outside California are masked, and the ones inside are set to your data values. Your X and Y inputs to pcolormesh should be 2-D arrays with the boundary values rather than the centers. It sounds like you would want to do all this via mpl_toolkits.basemap.Basemap so that you will end up with a properly proportioned and labeled map. Maybe I am misinterpreting your description of your data, however. Eric > > The only solution I could find was to use > scipy.interpolate,griddata() to “map” my grid to a bounding > rectangular grid (bounding rectangle around CA state), but that would > also interpolate my data to grid cells outside of CA state, which I > don’t want to do. > > Many thanks for any hints! Masha -- li...@us... > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Oliver <oli...@gm...> - 2014-11-21 13:13:16
|
As Thomas Caswell said, check out the "tri..." functions. No need for interpolation. This question recently reappeared on Stackoverflow and was answered there as well: https://stackoverflow.com/questions/27004422/contour-imshow-plot-for-irregular-x-y-z-data 2014-11-21 9:15 GMT+01:00 Shahar Shani Kadmiel <ka...@po...>: > When using scipy.interpolate.griddada, you could use 'nearest' if your > data is sufficiently dense. This will 'map' your grid onto whatever > rectangular grid leaving grid points outside the convex hull of the > original grid empty. Well, not empty but nan. > If you do wish to interpolate your dada, you could mask the resulting > rectangular grid post interpolation. > > — > Sent from Mailbox <https://www.dropbox.com/mailbox> > > > On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <li...@us...> wrote: > >> Hello, >> >> I have a problem plotting data which is defined on a grid other than >> rectangular mesh, and would greatly appreciate any advise. My data is >> defined for 0.1degree grid for the state of California, and I don’t want to >> interpolate my data outside of the defined grid when plotting it. I used >> pcolormesh() function for rectangular area maps, but it only accepts >> rectangular grid and I was wondering if there is a simple solution to my >> problem. >> >> The only solution I could find was to use scipy.interpolate,griddata() to >> “map” my grid to a bounding rectangular grid (bounding rectangle around CA >> state), but that would also interpolate my data to grid cells outside of CA >> state, which I don’t want to do. >> >> Many thanks for any hints! >> Masha >> -- >> li...@us... >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Shahar S. K. <ka...@po...> - 2014-11-21 09:13:52
|
When using scipy.interpolate.griddada, you could use 'nearest' if your data is sufficiently dense. This will 'map' your grid onto whatever rectangular grid leaving grid points outside the convex hull of the original grid empty. Well, not empty but nan. If you do wish to interpolate your dada, you could mask the resulting rectangular grid post interpolation. — Sent from Mailbox On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis <li...@us...> wrote: > Hello, > I have a problem plotting data which is defined on a grid other than rectangular mesh, and would greatly appreciate any advise. My data is defined for 0.1degree grid for the state of California, and I don’t want to interpolate my data outside of the defined grid when plotting it. I used pcolormesh() function for rectangular area maps, but it only accepts rectangular grid and I was wondering if there is a simple solution to my problem. > The only solution I could find was to use scipy.interpolate,griddata() to “map” my grid to a bounding rectangular grid (bounding rectangle around CA state), but that would also interpolate my data to grid cells outside of CA state, which I don’t want to do. > Many thanks for any hints! > Masha > -- > li...@us... > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Thomas C. <tca...@gm...> - 2014-11-21 04:38:28
|
There are also triangular mesh plotting (I think tricolormesh is the function name). The really brute force solution is to use poly collection and draw what ever shape you want. Tom |
From: Maria L. <li...@us...> - 2014-11-21 00:11:41
|
Hello, I have a problem plotting data which is defined on a grid other than rectangular mesh, and would greatly appreciate any advise. My data is defined for 0.1degree grid for the state of California, and I don’t want to interpolate my data outside of the defined grid when plotting it. I used pcolormesh() function for rectangular area maps, but it only accepts rectangular grid and I was wondering if there is a simple solution to my problem. The only solution I could find was to use scipy.interpolate,griddata() to “map” my grid to a bounding rectangular grid (bounding rectangle around CA state), but that would also interpolate my data to grid cells outside of CA state, which I don’t want to do. Many thanks for any hints! Masha -- li...@us... |