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
(6) |
|
2
(3) |
3
(4) |
4
(1) |
5
(19) |
6
(8) |
7
(3) |
8
|
|
9
|
10
(9) |
11
(3) |
12
(8) |
13
(17) |
14
(5) |
15
(2) |
|
16
(2) |
17
(7) |
18
(2) |
19
(4) |
20
(6) |
21
|
22
(5) |
|
23
|
24
(7) |
25
(2) |
26
(3) |
27
(9) |
28
(9) |
29
(6) |
|
30
(3) |
31
(8) |
|
|
|
|
|
|
From: Benjamin R. <ben...@ou...> - 2014-03-26 15:47:39
|
Not that I am aware of. We kind of brute-force it in the plot_surface()
function:
polys = []
# Only need these vectors to shade if there is no cmap
if cmap is None and shade :
totpts = int(np.ceil(float(rows - 1) / rstride) *
np.ceil(float(cols - 1) / cstride))
v1 = np.empty((totpts, 3))
v2 = np.empty((totpts, 3))
# This indexes the vertex points
which_pt = 0
#colset contains the data for coloring: either average z or the
facecolor
colset = []
for rs in xrange(0, rows-1, rstride):
for cs in xrange(0, cols-1, cstride):
ps = []
for a in (X, Y, Z) :
ztop = a[rs,cs:min(cols, cs+cstride+1)]
zleft = a[rs+1:min(rows, rs+rstride+1),
min(cols-1, cs+cstride)]
zbase = a[min(rows-1, rs+rstride), cs:min(cols,
cs+cstride+1):][::-1]
zright = a[rs:min(rows-1, rs+rstride):, cs][::-1]
z = np.concatenate((ztop, zleft, zbase, zright))
ps.append(z)
# The construction leaves the array with duplicate points,
which
# are removed here.
ps = zip(*ps)
lastp = np.array([])
ps2 = [ps[0]] + [ps[i] for i in xrange(1, len(ps)) if ps[i]
!= ps[i-1]]
avgzsum = sum(p[2] for p in ps2)
polys.append(ps2)
if fcolors is not None:
colset.append(fcolors[rs][cs])
else:
colset.append(avgzsum / len(ps2))
# Only need vectors to shade if no cmap
if cmap is None and shade:
i1, i2, i3 = 0, int(len(ps2)/3), int(2*len(ps2)/3)
v1[which_pt] = np.array(ps2[i1]) - np.array(ps2[i2])
v2[which_pt] = np.array(ps2[i2]) - np.array(ps2[i3])
which_pt += 1
if cmap is None and shade:
normals = np.cross(v1, v2)
else :
normals = []
If you find a better way to do this, I will owe you some beers.
Cheers!
Ben Root
On Wed, Mar 26, 2014 at 7:17 AM, <cl...@br...> wrote:
> Dear colleagues,
>
> Exploring the 3D support for plotting a simple trapezoid isosceles based
> on eight locations with x,y,z (imagine a water tank). When doing a manual
> selection of the collections that defines each surface plane, the drawing
> works well (see a sample below). Watching for a more automated process that
> could work with a complex surface based on any Polygons.
>
> My question: Is there an algorithm, or function in Numpy or Matplotlib
> that identifies the quartet of each plane in the sample below? I've tried
> to apply Numpy function "combinations", but it generates too many
> collections.
>
> Thanks in advance for your hint to optimize this drawing with the
> Matplotlib with Poly3DCollection
>
> Sample Code
> -----------
> from mpl_toolkits.mplot3d import Axes3D
> from mpl_toolkits.mplot3d.art3d import Poly3DCollection
> from mpl_toolkits.mplot3d.art3d import Line3DCollection
> import matplotlib.pyplot as plt
> from matplotlib import cm
> import matplotlib.colors as colors
> from numpy import random
> fig = plt.figure()
> ax = Axes3D(fig)
> # for random color settings
> color = colors.rgb2hex(random.rand(3))
> # blue color
> color = 'b'
> #mypoly = [[2, 0, -1], [2, 0, 1], [4, 0, 1], [4, 0, -1], [0, 4, -2], [0,
> 4, 2], [6, 4, 2], [6, 4, -2]]
> # A B C D E
> F G H
> # Colections for drawing 3D plot with polygon (each plane defined
> separately)
> #plane a: A,E,H,D
> #plane b: A,E,F,B
> #plane c: B,F,G,C
> #plane d: C,G,H,D
> #plane e: E,F,G,H
> #plane f: A,B,C,D
> #plane collection
> xa = [2,0,6,4]
> ya = [0,4,4,0]
> za = [-1,-2,-2,-1]
> #second collection
> xb = [2,0,0,2]
> yb = [0,4,4,0]
> zb = [-1,-2,2,1]
> #third collection
> xc = [2,0,6,4]
> yc = [0,4,4,0]
> zc = [1,2,2,1]
> #fourth collection
> xd = [4,6,6,4]
> yd = [0,4,4,0]
> zd = [1,2,-2,-1]
> #fifth collection (kept open, to watch the plot result)
> xe = [0,0,6,6]
> ye = [4,4,4,4]
> ze = [-2,2,2,-2]
> #sixth collection
> xf = [2,2,4,4]
> yf = [0,0,0,0]
> zf = [-1,1,1,-1]
> # to do
> verts = [zip(xa, ya,za),zip(xb, yb,zb),zip(xc, yc,zc),zip(xd,
> yd,zd),zip(xf, yf,zf)]
> ax.add_collection3d(Poly3DCollection(verts, facecolors=color,
> linewidths=1, alpha=0.5))
> ax.add_collection3d(Line3DCollection(verts, colors='k', linewidths=0.2,
> linestyles=':'))
> # set axis view
> # add grid
> ax.grid(True)
> # view
> ax.set_xlim(-1,6)
> ax.set_ylim(-1,6)
> ax.set_zlim(-5,5)
> ax.view_init(elev=10., azim=110.)
> ax.get_xaxis().set_visible(True)
> ax.get_yaxis().set_visible(True)
> ax.set_autoscale_on(True)
> plt.show()
>
> Thanks for support.
>
> Regards,
> Claude
>
>
>
>
>
>
>
>
>
> * Claude Falbriard Certified IT Specialist L2 - Middleware AMS Hortolândia
> / SP - Brazil phone: +55 13 9 9760 0453 <%2B55%2013%209%209760%200453>
> cell: +55 13 9 8117 3316 <%2B55%2013%209%208117%203316> e-mail:
> cl...@br... <cl...@br...> *
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: <cl...@br...> - 2014-03-26 11:48:18
|
Dear colleagues, Exploring the 3D support for plotting a simple trapezoid isosceles based on eight locations with x,y,z (imagine a water tank). When doing a manual selection of the collections that defines each surface plane, the drawing works well (see a sample below). Watching for a more automated process that could work with a complex surface based on any Polygons. My question: Is there an algorithm, or function in Numpy or Matplotlib that identifies the quartet of each plane in the sample below? I've tried to apply Numpy function "combinations", but it generates too many collections. Thanks in advance for your hint to optimize this drawing with the Matplotlib with Poly3DCollection Sample Code ----------- from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d.art3d import Poly3DCollection from mpl_toolkits.mplot3d.art3d import Line3DCollection import matplotlib.pyplot as plt from matplotlib import cm import matplotlib.colors as colors from numpy import random fig = plt.figure() ax = Axes3D(fig) # for random color settings color = colors.rgb2hex(random.rand(3)) # blue color color = 'b' #mypoly = [[2, 0, -1], [2, 0, 1], [4, 0, 1], [4, 0, -1], [0, 4, -2], [0, 4, 2], [6, 4, 2], [6, 4, -2]] # A B C D E F G H # Colections for drawing 3D plot with polygon (each plane defined separately) #plane a: A,E,H,D #plane b: A,E,F,B #plane c: B,F,G,C #plane d: C,G,H,D #plane e: E,F,G,H #plane f: A,B,C,D #plane collection xa = [2,0,6,4] ya = [0,4,4,0] za = [-1,-2,-2,-1] #second collection xb = [2,0,0,2] yb = [0,4,4,0] zb = [-1,-2,2,1] #third collection xc = [2,0,6,4] yc = [0,4,4,0] zc = [1,2,2,1] #fourth collection xd = [4,6,6,4] yd = [0,4,4,0] zd = [1,2,-2,-1] #fifth collection (kept open, to watch the plot result) xe = [0,0,6,6] ye = [4,4,4,4] ze = [-2,2,2,-2] #sixth collection xf = [2,2,4,4] yf = [0,0,0,0] zf = [-1,1,1,-1] # to do verts = [zip(xa, ya,za),zip(xb, yb,zb),zip(xc, yc,zc),zip(xd, yd,zd),zip(xf, yf,zf)] ax.add_collection3d(Poly3DCollection(verts, facecolors=color, linewidths=1, alpha=0.5)) ax.add_collection3d(Line3DCollection(verts, colors='k', linewidths=0.2, linestyles=':')) # set axis view # add grid ax.grid(True) # view ax.set_xlim(-1,6) ax.set_ylim(-1,6) ax.set_zlim(-5,5) ax.view_init(elev=10., azim=110.) ax.get_xaxis().set_visible(True) ax.get_yaxis().set_visible(True) ax.set_autoscale_on(True) plt.show() Thanks for support. Regards, Claude Claude Falbriard Certified IT Specialist L2 - Middleware AMS Hortolândia / SP - Brazil phone: +55 13 9 9760 0453 cell: +55 13 9 8117 3316 e-mail: cl...@br... |
|
From: Pierre H. <pie...@cr...> - 2014-03-26 09:56:09
|
Hi, True enough, I didn't tested in a Notebook, but now it seems to work as well: https://gist.github.com/pierre-haessig/9779940 http://nbviewer.ipython.org/gist/pierre-haessig/9779940 (just a test with mpl.rcParams['axes.facecolor'] = 'red') best, Pierre Le 25/03/2014 18:20, Adam Hughes a écrit : > Thanks Pierre. > > I tried this with several different color types and couldn't see any > difference in my plots in the notebook. Did you by chance try this > out and see a difference? > > > On Tue, Mar 25, 2014 at 9:51 AM, Pierre Haessig > <pie...@cr... <mailto:pie...@cr...>> wrote: > > Hi, > > Le 20/03/2014 18:40, Adam Hughes a écrit : > > I am using an IPython notebook style that has a soft, yellow > > background that I think is more appealing that white. When I make a > > plot, I'd like the background of the plot (ie, everything that is > > outside the x and y axis) to be the same color. I'm trying to > change > > the figure.facecolor parameter through rc params but I don't see any > > changes. Is figure.facecolor event he correct parameter? > > > > Has anyone done this successfully? > > > I think that 'axes.facecolor' does the job. > > 'figure.facecolor' changes the background of the figure outside the > plots (axes), that is the background color of the windows (which > is not > visible in the Notebook). > > best, > Pierre > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases > and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |