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
(47) |
2
(13) |
3
(12) |
4
(16) |
5
(3) |
|
6
(6) |
7
(20) |
8
(45) |
9
(24) |
10
(30) |
11
(14) |
12
(4) |
|
13
(1) |
14
(6) |
15
(6) |
16
(10) |
17
(15) |
18
(13) |
19
(4) |
|
20
|
21
(14) |
22
(13) |
23
(9) |
24
(19) |
25
(24) |
26
|
|
27
(4) |
28
(20) |
29
(17) |
30
(7) |
|
|
|
|
From: Eric F. <ef...@ha...> - 2010-06-11 21:28:14
|
On 06/11/2010 10:54 AM, Dr. David Kirkby wrote: > The latest stable (0.99.3) matplotlib builds ok on Solaris 10 03/05 on SPARC. > > However, your latest trunc release has some useful fixes, so it was downloaded > by a fellow Sage devloper. However, when I try to build this version on a Sun > Blade 1000 running Solaris 10 03/05, it presents a problem: > > /usr/include/stdlib.h:144: error: declaration of C function 'void swab(const > char*, char*, ssize_t)' conflicts with > /usr/include/unistd.h:480: error: previous declaration 'void swab(const void*, > void*, ssize_t)' here > error: command 'gcc' failed with exit status 1 > Error building matplotlib package. > > > There are two declarations of 'swab' in the Solaris header files, and what one > you get depends on the compilation mode. The reasons are explained in the > Solaris header files. > > The issue is traced at > > http://trac.sagemath.org/sage_trac/ticket/9202 > > where you will see the full error message and attachments of the header files. > > For this, gcc 4.4.4 was used. Can you get it to work by adding "-D_XOPEN_SOURCE" to your CFLAGS environment variable? Eric > > Dave > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: MedEng1 <rya...@ms...> - 2010-06-11 20:58:21
|
I'm relatively new to matplotlib so I need some help. I'm trying to make a
direction field plot for visualzing solutions to differential eqs. My first
attempt at a simple plot came out all right but I can't figure out why the
plotted lines are not the same length. The block of code that does all of
the work is...
for x in ax1.xaxis.iter_ticks(): #Iterate
over x-ticks
for y in ax1.yaxis.iter_ticks(): #iterate
over y-ticks
# Solve for local slope at point to be evaluated (dy/dx)
yp = 9.8 - ((np.float(y[1]))/4) #yp = y` as
in dy/dx
# Plot line based on slope
cpx = np.float(x[1]) #cpx = x-coord of line center,
convert x-tick value to float
cpy = np.float(y[1]) #cpy = y-coord of line center,
covnert y-tick value to float
a = np.arctan(yp) #a = angle between line and
horizontal
px = np.cos(a)*(L/2) #px = x offset from line center to
end
py = np.sin(a)*(L/2) #py = y offset from line center
to end
tpx = cpx + px #tpx = x-coord of right hand
end of line
tpy = cpy + py #tpy = y-coord of right hand
end of line
bpx = cpx - px #bpx = x-coord of left hand end
of line
bpy = cpy - py #bpy = y-coord of left hand end
of line
Length = np.sqrt(((tpx-bpx)**2)+((tpy-bpy)**2))
#just a quick check of the line length accoring to the coordinates of
the ends
ax1.plot([bpx, tpx], [bpy, tpy], color='black', linewidth=0.75)
As you can see in the attached figure (see below), the lines seem to plot in
the right locations and right angles but the lengths are not constant (not
intended - seem to be twice as long near the middle of the chart). Am I
missing something obvious? Why are the lines near the center of the chart
longer? Thanks in advance for any help provided.
-Ryan
http://old.nabble.com/file/p28859981/img1.png
--
View this message in context: http://old.nabble.com/Need-help-with-direction-field-plot-tp28859981p28859981.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Dr. D. K. <dav...@on...> - 2010-06-11 20:55:32
|
The latest stable (0.99.3) matplotlib builds ok on Solaris 10 03/05 on SPARC. However, your latest trunc release has some useful fixes, so it was downloaded by a fellow Sage devloper. However, when I try to build this version on a Sun Blade 1000 running Solaris 10 03/05, it presents a problem: /usr/include/stdlib.h:144: error: declaration of C function 'void swab(const char*, char*, ssize_t)' conflicts with /usr/include/unistd.h:480: error: previous declaration 'void swab(const void*, void*, ssize_t)' here error: command 'gcc' failed with exit status 1 Error building matplotlib package. There are two declarations of 'swab' in the Solaris header files, and what one you get depends on the compilation mode. The reasons are explained in the Solaris header files. The issue is traced at http://trac.sagemath.org/sage_trac/ticket/9202 where you will see the full error message and attachments of the header files. For this, gcc 4.4.4 was used. Dave |
|
From: Oz N. <na...@gm...> - 2010-06-11 20:51:48
|
Hi Everyone, I'd like to know, what is the underline mechanism that connects the points of my gridded data when I use contour(). Can I control this mechanism ? Maybe I missed it in the documentation, but it's not clear to me. Thanks in advance, -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
|
From: Jeff P. <je...@gm...> - 2010-06-11 15:53:35
|
Clearing the font cache works too. Although, judging from the debug output, it still seems to find the fonts in the system directories. There are no fonts in the matplotlib site-packed dir: [jsp@psy86] 1014:$ ls /usr/lib64/python2.6/site-packages/matplotlib/mpl-data/ example/ images/ lineprops.glade matplotlib.conf matplotlibrc I installed matplotlib with gnome package kit from the fc12 repos. I manually installed stix only after seeing this problem (after my font cache was already hosed). ... findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0 to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of 0.100000 findfont: Matching :family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXGeneral (/usr/share/fonts/stix/STIXGeneral.otf) with score of 0.000000 findfont: Matching :family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXSize1 (/usr/share/fonts/stix/STIXSiz1Sym.otf) with score of 0.000000 findfont: Matching :family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0 to STIXGeneral (/usr/share/fonts/stix/STIXGeneralBol.otf) with score of 0.000000 findfont: Matching :family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXSize3 (/usr/share/fonts/stix/STIXSiz3Sym.otf) with score of 0.000000 findfont: Matching :family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXSize4 (/usr/share/fonts/stix/STIXSiz4Sym.otf) with score of 0.000000 findfont: Matching :family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXSize5 (/usr/share/fonts/stix/STIXSiz5Sym.otf) with score of 0.000000 findfont: Matching :family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXSize2 (/usr/share/fonts/stix/STIXSiz2Sym.otf) with score of 0.000000 findfont: Matching :family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXGeneral (/usr/share/fonts/stix/STIXGeneralItalic.otf) with score of 0.000000 findfont: Matching :family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXNonUnicode (/usr/share/fonts/stix/STIXNonUniIta.otf) with score of 0.000000 findfont: Matching :family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to STIXNonUnicode (/usr/share/fonts/stix/STIXNonUni.otf) with score of 0.000000 findfont: Matching :family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0 to STIXNonUnicode (/usr/share/fonts/stix/STIXNonUniBol.otf) with score of 0.000000 findfont: Could not match :family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. Returning /usr/share/fonts/un-core/UnDotum.ttf findfont: Could not match :family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. Returning /usr/share/fonts/un-core/UnDotum.ttf findfont: Matching :family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to cmmi10 (/usr/share/fonts/lyx/cmmi10.ttf) with score of 0.000000 findfont: Matching :family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to cmex10 (/usr/share/fonts/lyx/cmex10.ttf) with score of 0.000000 findfont: Matching :family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to cmsy10 (/usr/share/fonts/lyx/cmsy10.ttf) with score of 0.000000 findfont: Matching :family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 to cmr10 (/usr/share/fonts/lyx/cmr10.ttf) with score of 0.000000 findfont: Could not match :family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. Returning /usr/share/fonts/un-core/UnDotum.ttf > The problem here is that it isn't finding the STIX fonts in the > matplotlib distribution, but from system locations -- and it's actually > not finding all of them, only some. > > How did you install matplotlib? Did you try John's suggestion of > clearing the font caches? Do you see any STIX ttf fonts under > > /usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf > > ? > > Mike > |
|
From: John H. <jd...@gm...> - 2010-06-11 15:07:53
|
On Fri, Jun 11, 2010 at 9:38 AM, Jack Liddle <j.l...@fz...> wrote: > Hello all. > > I'm trying to apply a transformation (Affine2D) to a text artist. For > some reason the artist doesn't show up in the plot. I have a simple > code here which demonstrates the problem. Any ideas what I'm doing > wrong? > > Thanks > > Jack Liddle > > from numpy import * > import matplotlib.pyplot as plt > from matplotlib.text import Text > > fig = plt.figure() > > from matplotlib.transforms import Affine2D,Transform > ax1 = fig.add_subplot(111) > > #Something to plot > xs = linspace(0,1,100) > ys = xs**2 > ax1.plot(xs,ys) > > #The transformation > mytrans = Affine2D() > print mytrans > print isinstance(mytrans,Transform) > > > t = Text(0.5,0.5,"Problems?",transform=mytrans) > ax1.add_artist(t) > plt.show() The transformation must take input in your coordinate system and output in display coordinate systems. The default Affine2D transformation is identity, so you are transforming 0.5, 0.5 userland coordinates to 0.5, 0.5 display. This display coordinate falls outside the Axes window and so is being clipped. If you turn clipping off, you will see part of your text in the lower left t = Text(0.5, 0.5,"Problems?",transform=mytrans, clip_on=False) If you want to see it in the middle of your plot, you could do something like t = Text(200, 200,"Problems?",transform=mytrans, clip_on=False) Note this transformation applies only to the x,y location of the text, and will not transform the glyphs of the text. See http://matplotlib.sourceforge.net/users/transforms_tutorial.html for more details on transformations. JDH |
|
From: Benjamin R. <ben...@ou...> - 2010-06-11 14:50:43
|
Ola,
Just to make sure, have you tried "ax.set_xticks([])"?
Ben Root
On Fri, Jun 11, 2010 at 3:05 AM, Ola Skavhaug <ska...@si...> wrote:
> Hi,
>
> I'm trying to remove the xtickmarks and ytickmarks from a 3d plot,
> without any success.
>
> The example I experiment with is the following:
>
> from mpl_toolkits.mplot3d import axes3d
> import matplotlib.pyplot as plt
>
> fig = plt.figure()
> ax = axes3d.Axes3D(fig)
> X, Y, Z = axes3d.get_test_data(0.05)
> cset = ax.contour(X, Y, Z, 16, extend3d=True)
> ax.clabel(cset, fontsize=9, inline=1)
>
> #One try that didn't work
> ax.set_xticklabels("")
>
> plt.show()
>
> It looks like the final plot ignores all my efforts in turning the
> ticks off. Any help on this matter would be greatly appreciated.
>
> Regards,
> --
> Ola Skavhaug
> Research Programmer
> Simula Research Laboratory
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Jack L. <j.l...@fz...> - 2010-06-11 14:38:21
|
Hello all. I'm trying to apply a transformation (Affine2D) to a text artist. For some reason the artist doesn't show up in the plot. I have a simple code here which demonstrates the problem. Any ideas what I'm doing wrong? Thanks Jack Liddle from numpy import * import matplotlib.pyplot as plt from matplotlib.text import Text fig = plt.figure() from matplotlib.transforms import Affine2D,Transform ax1 = fig.add_subplot(111) #Something to plot xs = linspace(0,1,100) ys = xs**2 ax1.plot(xs,ys) #The transformation mytrans = Affine2D() print mytrans print isinstance(mytrans,Transform) t = Text(0.5,0.5,"Problems?",transform=mytrans) ax1.add_artist(t) plt.show() |
|
From: Michael D. <md...@st...> - 2010-06-11 14:23:35
|
The problem here is that it isn't finding the STIX fonts in the matplotlib distribution, but from system locations -- and it's actually not finding all of them, only some. How did you install matplotlib? Did you try John's suggestion of clearing the font caches? Do you see any STIX ttf fonts under /usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf ? Mike On 06/11/2010 10:18 AM, Jeff Perry wrote: > I found that setting > > mathtext.fontset : stix > > fixed the problem. > > Here is the debug-annoying output when mathtext.fontset is not set: > > ./plotlut2.py lut2.txt "figure 1a" > matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data > loaded rc file /home/jsp/.matplotlib/matplotlibrc > matplotlib version 0.99.1.1 > verbose.level debug-annoying > interactive is False > units is False > platform is linux2 > loaded modules: ['numpy.lib._iotools', 'xml.sax.handler', > 'numpy.core.info', 'distutils', 'matplotlib.errno', 'random', > 'subprocess', 'gc', 'matplotlib.tempfile', 'numpy.lib.getlimits', > 'ctypes._endian', 'encodings.encodings', 'matplotlib.colors', > 'numpy.core.numerictypes', 'numpy.testing.sys', > 'numpy.lib.__future__', 'xml', 'fnmatch', 'numpy.ma.operator', > 'numpy.ma.cPickle', 'struct', 'numpy.random.info', 'tempfile', > 'encodings.codecs', 'base64', 'numpy.linalg', 'matplotlib.threading', > 'numpy.testing.operator', 'imp', 'numpy.testing', 'collections', > 'numpy.core.umath', 'distutils.types', 'numpy.core.scalarmath', > 'functools', 'zipimport', 'string', 'matplotlib.subprocess', > 'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops', > 'numpy.testing.unittest', 'numpy.lib.math', 'encodings.utf_8', > 'matplotlib.__future__', 'ssl', 'numpy.testing.re', 'itertools', > 'numpy.version', 'numpy.lib.re', 'distutils.re', 'ctypes.os', > 'numpy.core.os', 'numpy.lib.type_check', 'matplotlib.os', > 'numpy.lib.__builtin__', 'signal', 'numpy.lib.types', > 'numpy.lib._datasource', 'numpy.lib.io', 'numpy.ma.extras', 'token', > 'numpy.fft.fftpack_lite', 'matplotlib.cbook', 'numpy.core.multiarray', > 'numpy.__builtin__', 'dis', 'numpy.lib.itertools', 'cStringIO', > 'numpy.ma.core', 'numpy.numpy', 'matplotlib.StringIO', 'locale', > 'numpy.add_newdocs', 'distutils.sysconfig', 'xml.sax.urlparse', > 'syslog', 'xml.sax.saxutils', 'matplotlib.numpy', 'numpy.lib.sys', > 'encodings', 'numpy.ma.itertools', 'abc', 'numpy.ctypes', > 'numpy.testing.decorators', 'matplotlib.warnings', > 'matplotlib.string', 'numpy.lib.numpy', 'matplotlib.sys', 're', > 'numpy.lib._compiled_base', 'threading', 'new', 'numpy.random.mtrand', > 'math', 'numpy.fft.helper', 'fcntl', 'numpy.ma.warnings', > 'matplotlib.fontconfig_pattern', 'numpy.fft.types', 'UserDict', > 'inspect', 'distutils.os', '_ctypes', 'numpy.fft.numpy', > 'xml.sax.codecs', 'numpy.lib.ufunclike', 'numpy.lib.info', 'ctypes', > 'numpy.lib.warnings', 'ctypes.struct', 'numpy.core.sys', > 'numpy.core._sort', 'numpy.os', 'paste', '_functools', '_locale', > 'matplotlib.sre_constants', 'numpy.lib.shutil', 'thread', 'StringIO', > 'numpy.core.memmap', 'traceback', 'weakref', 'numpy.core._internal', > 'numpy.fft.fftpack', 'opcode', 'numpy.linalg.lapack_lite', > 'distutils.sys', 'os', 'marshal', 'distutils.version', '__future__', > '_collections', 'xml.sax.types', 'matplotlib.traceback', '_sre', > 'unittest', 'codecs', 'numpy.random', 'numpy.linalg.numpy', > '__builtin__', 'numpy.lib.twodim_base', 'matplotlib.copy', > 'matplotlib.re', 'numpy.core.cPickle', 'operator', 'sre_constants', > 'distutils.string', 'numpy.lib.arrayterator', 'select', > 'ctypes._ctypes', 'ctypes.sys', 'matplotlib.datetime', 'posixpath', > 'numpy.lib.financial', 'errno', '_socket', 'binascii', > 'numpy.core.arrayprint', 'datetime', 'numpy.ma', > 'matplotlib.matplotlib', 'os.path', 'tokenize', > 'numpy.lib.stride_tricks', 'numpy.core.numpy', 'numpy', '_warnings', > 'matplotlib.types', 'numpy.core.defmatrix', 'xml.sax.os', 'cPickle', > 'encodings.__builtin__', 'matplotlib.xml', '_codecs', > 'numpy.lib.operator', 'numpy.__config__', 'numpy.testing.utils', > 'xml.sax.xmlreader', 'numpy.ma.numpy', 'copy', 'numpy.core.re', > '_struct', 'numpy.core.fromnumeric', 'numpy.ctypeslib', 'keyword', > 'numpy.lib.scimath', 'numpy.fft', 'numpy.lib', 'numpy.random.numpy', > 'posix', 'encodings.aliases', 'numpy.lib.function_base', 'exceptions', > 'sre_parse', 'abrt_exception_handler', 'pickle', 'numpy.core.ctypes', > 'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax', > '_random', 'site', 'numpy.lib.polynomial', 'urllib', > 'numpy._import_tools', '__main__', 'numpy.fft.info', > 'numpy.core.records', 'numpy.core._dotblas', 'numpy.lib.cPickle', > 'numpy.sys', 'matplotlib.weakref', 'urlparse', 'xml.sax.urllib', > 'shutil', 'numpy.testing.traceback', 'strop', > 'numpy.testing.numpytest', 'numpy.core.numeric', 'numpy.linalg.info', > 'numpy.core.defchararray', '_abcoll', 'numpy.core', > 'matplotlib.rcsetup', 'matplotlib.time', 'xml.sax._exceptions', > 'genericpath', 'stat', '_ssl', 'numpy.lib.index_tricks', 'warnings', > 'numpy.lib.utils', 'numpy.lib.shape_base', 'numpy.core.types', > 'textwrap', 'sys', 'numpy.core.warnings', 'socket', > 'numpy.core.__builtin__', 'ctypes.ctypes', 'numpy.lib.format', > 'numpy.lib.os', 'numpy.testing.nosetester', 'types', 'xml.sax.sys', > 'matplotlib.distutils', '_weakref', 'numpy.ma.inspect', > 'distutils.errors', 'matplotlib', 'linecache', 'matplotlib.shutil', > 'numpy.lib.cStringIO', 'time', 'numpy.lib.machar', > 'numpy.linalg.linalg', 'matplotlib.pyparsing'] > $HOME=/home/jsp > CONFIGDIR=/home/jsp/.matplotlib > Using fontManager instance from /home/jsp/.matplotlib/fontList.cache > backend GTKAgg version 2.16.0 > FigureCanvasAgg.draw > RendererAgg.__init__ > RendererAgg.__init__ width=640.0, height=480.0 > RendererAgg.__init__ _RendererAgg done > RendererAgg.__init__ done > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium > to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of > 0.100000 > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0 > to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of > 0.100000 > findfont: Matching > :family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0 > to STIXGeneral (/usr/share/fonts/stix/STIXGeneral.otf) with score of > 0.000000 > findfont: Could not match > :family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Matching > :family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0 > to STIXGeneral (/usr/share/fonts/stix/STIXGeneralBol.otf) with score > of 0.000000 > findfont: Could not match > :family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Matching > :family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0 > to STIXGeneral (/usr/share/fonts/stix/STIXGeneralItalic.otf) with > score of 0.000000 > findfont: Could not match > :family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > findfont: Could not match > :family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. > Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf > RendererAgg.draw_text > RendererAgg.draw_mathtext > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg.draw_mathtext > RendererAgg._get_agg_font > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large > to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of > 0.100000 > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg.draw_mathtext > FigureCanvasAgg.buffer_rgba > RendererAgg.buffer_rgba > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
|
From: Jeff P. <je...@gm...> - 2010-06-11 14:18:40
|
I found that setting
mathtext.fontset : stix
fixed the problem.
Here is the debug-annoying output when mathtext.fontset is not set:
./plotlut2.py lut2.txt "figure 1a"
matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data
loaded rc file /home/jsp/.matplotlib/matplotlibrc
matplotlib version 0.99.1.1
verbose.level debug-annoying
interactive is False
units is False
platform is linux2
loaded modules: ['numpy.lib._iotools', 'xml.sax.handler',
'numpy.core.info', 'distutils', 'matplotlib.errno', 'random',
'subprocess', 'gc', 'matplotlib.tempfile', 'numpy.lib.getlimits',
'ctypes._endian', 'encodings.encodings', 'matplotlib.colors',
'numpy.core.numerictypes', 'numpy.testing.sys',
'numpy.lib.__future__', 'xml', 'fnmatch', 'numpy.ma.operator',
'numpy.ma.cPickle', 'struct', 'numpy.random.info', 'tempfile',
'encodings.codecs', 'base64', 'numpy.linalg', 'matplotlib.threading',
'numpy.testing.operator', 'imp', 'numpy.testing', 'collections',
'numpy.core.umath', 'distutils.types', 'numpy.core.scalarmath',
'functools', 'zipimport', 'string', 'matplotlib.subprocess',
'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops',
'numpy.testing.unittest', 'numpy.lib.math', 'encodings.utf_8',
'matplotlib.__future__', 'ssl', 'numpy.testing.re', 'itertools',
'numpy.version', 'numpy.lib.re', 'distutils.re', 'ctypes.os',
'numpy.core.os', 'numpy.lib.type_check', 'matplotlib.os',
'numpy.lib.__builtin__', 'signal', 'numpy.lib.types',
'numpy.lib._datasource', 'numpy.lib.io', 'numpy.ma.extras', 'token',
'numpy.fft.fftpack_lite', 'matplotlib.cbook', 'numpy.core.multiarray',
'numpy.__builtin__', 'dis', 'numpy.lib.itertools', 'cStringIO',
'numpy.ma.core', 'numpy.numpy', 'matplotlib.StringIO', 'locale',
'numpy.add_newdocs', 'distutils.sysconfig', 'xml.sax.urlparse',
'syslog', 'xml.sax.saxutils', 'matplotlib.numpy', 'numpy.lib.sys',
'encodings', 'numpy.ma.itertools', 'abc', 'numpy.ctypes',
'numpy.testing.decorators', 'matplotlib.warnings',
'matplotlib.string', 'numpy.lib.numpy', 'matplotlib.sys', 're',
'numpy.lib._compiled_base', 'threading', 'new', 'numpy.random.mtrand',
'math', 'numpy.fft.helper', 'fcntl', 'numpy.ma.warnings',
'matplotlib.fontconfig_pattern', 'numpy.fft.types', 'UserDict',
'inspect', 'distutils.os', '_ctypes', 'numpy.fft.numpy',
'xml.sax.codecs', 'numpy.lib.ufunclike', 'numpy.lib.info', 'ctypes',
'numpy.lib.warnings', 'ctypes.struct', 'numpy.core.sys',
'numpy.core._sort', 'numpy.os', 'paste', '_functools', '_locale',
'matplotlib.sre_constants', 'numpy.lib.shutil', 'thread', 'StringIO',
'numpy.core.memmap', 'traceback', 'weakref', 'numpy.core._internal',
'numpy.fft.fftpack', 'opcode', 'numpy.linalg.lapack_lite',
'distutils.sys', 'os', 'marshal', 'distutils.version', '__future__',
'_collections', 'xml.sax.types', 'matplotlib.traceback', '_sre',
'unittest', 'codecs', 'numpy.random', 'numpy.linalg.numpy',
'__builtin__', 'numpy.lib.twodim_base', 'matplotlib.copy',
'matplotlib.re', 'numpy.core.cPickle', 'operator', 'sre_constants',
'distutils.string', 'numpy.lib.arrayterator', 'select',
'ctypes._ctypes', 'ctypes.sys', 'matplotlib.datetime', 'posixpath',
'numpy.lib.financial', 'errno', '_socket', 'binascii',
'numpy.core.arrayprint', 'datetime', 'numpy.ma',
'matplotlib.matplotlib', 'os.path', 'tokenize',
'numpy.lib.stride_tricks', 'numpy.core.numpy', 'numpy', '_warnings',
'matplotlib.types', 'numpy.core.defmatrix', 'xml.sax.os', 'cPickle',
'encodings.__builtin__', 'matplotlib.xml', '_codecs',
'numpy.lib.operator', 'numpy.__config__', 'numpy.testing.utils',
'xml.sax.xmlreader', 'numpy.ma.numpy', 'copy', 'numpy.core.re',
'_struct', 'numpy.core.fromnumeric', 'numpy.ctypeslib', 'keyword',
'numpy.lib.scimath', 'numpy.fft', 'numpy.lib', 'numpy.random.numpy',
'posix', 'encodings.aliases', 'numpy.lib.function_base', 'exceptions',
'sre_parse', 'abrt_exception_handler', 'pickle', 'numpy.core.ctypes',
'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax',
'_random', 'site', 'numpy.lib.polynomial', 'urllib',
'numpy._import_tools', '__main__', 'numpy.fft.info',
'numpy.core.records', 'numpy.core._dotblas', 'numpy.lib.cPickle',
'numpy.sys', 'matplotlib.weakref', 'urlparse', 'xml.sax.urllib',
'shutil', 'numpy.testing.traceback', 'strop',
'numpy.testing.numpytest', 'numpy.core.numeric', 'numpy.linalg.info',
'numpy.core.defchararray', '_abcoll', 'numpy.core',
'matplotlib.rcsetup', 'matplotlib.time', 'xml.sax._exceptions',
'genericpath', 'stat', '_ssl', 'numpy.lib.index_tricks', 'warnings',
'numpy.lib.utils', 'numpy.lib.shape_base', 'numpy.core.types',
'textwrap', 'sys', 'numpy.core.warnings', 'socket',
'numpy.core.__builtin__', 'ctypes.ctypes', 'numpy.lib.format',
'numpy.lib.os', 'numpy.testing.nosetester', 'types', 'xml.sax.sys',
'matplotlib.distutils', '_weakref', 'numpy.ma.inspect',
'distutils.errors', 'matplotlib', 'linecache', 'matplotlib.shutil',
'numpy.lib.cStringIO', 'time', 'numpy.lib.machar',
'numpy.linalg.linalg', 'matplotlib.pyparsing']
$HOME=/home/jsp
CONFIGDIR=/home/jsp/.matplotlib
Using fontManager instance from /home/jsp/.matplotlib/fontList.cache
backend GTKAgg version 2.16.0
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=480.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneral.otf) with score of
0.000000
findfont: Could not match
:family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneralBol.otf) with score
of 0.000000
findfont: Could not match
:family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Matching
:family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneralItalic.otf) with
score of 0.000000
findfont: Could not match
:family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
RendererAgg.draw_text
RendererAgg.draw_mathtext
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg.draw_mathtext
RendererAgg._get_agg_font
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg.draw_mathtext
FigureCanvasAgg.buffer_rgba
RendererAgg.buffer_rgba
|
|
From: John H. <jd...@gm...> - 2010-06-11 13:12:58
|
On Fri, Jun 11, 2010 at 7:50 AM, Michael Droettboom <md...@st...> wrote: > Can you set the rcParam 'verbose.level' to 'debug-annoying' and send us the > output? > > What version of matplotlib? Which backend? You may also want to clear your fonts and tex cache rm -rf ~/.matplotlib/font*.cache rm -rf ~/.matplotlib/tex.cache though this is probably not the source of your problems.... JDH |
|
From: Michael D. <md...@st...> - 2010-06-11 12:50:47
|
Can you set the rcParam 'verbose.level' to 'debug-annoying' and send us
the output?
What version of matplotlib? Which backend?
Mike
On 06/10/2010 04:03 PM, Jeff Perry wrote:
> When I run the following, I get gibberish for the math symbols: ),?,"
> instead of alph's, beta's, ..., etc.
>
> I believe I have all the correct fonts installed: stix, computer
> modern. I have tex and latex installed.
>
> Any suggestions? I am running FC12.
>
> Thanks,
> Jeff
>
> 1 import numpy as np
> 2 import matplotlib.pyplot as plt
> 3 t = np.arange(0.0, 2.0, 0.01)
> 4 s = np.sin(2*np.pi*t)
> 5
> 6 plt.plot(t,s)
> 7 plt.title(r'$\alpha_i> \beta_i$', fontsize=20)
> 8 plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
> 9 plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
> 10 fontsize=20)
> 11 plt.xlabel('time (s)')
> 12 plt.ylabel('volts (mV)')
> 13 plt.show()
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
|
|
From: Pablo A. <pab...@ua...> - 2010-06-11 11:03:55
|
Hello!
I wonder if there is a way to make 3d plots specifying arbitrary
colors, instead of having the color be a function of the height. I was
able to achieve this making minimal changes to the plot_surface method
of Axes3D, adding as an optional keyword argument a function *cfun*
which specifies the color (it specifies a real number that is mapped
into a color by the color map *cmap*). But is there a standard way?
Regard
Pablo Angulo
from matplotlib.colors import Normalize, colorConverter
def plot_surface(self, X, Y, Z, *args, **kwargs):
'''
Create a surface plot.
By default it will be colored in shades of a solid color,
but it also supports color mapping by supplying the *cmap*
argument.
========== ================================================
Argument Description
========== ================================================
*X*, *Y*, Data values as numpy.arrays
*Z*
*rstride* Array row stride (step size)
*cstride* Array column stride (step size)
*color* Color of the surface patches
*cmap* A colormap for the surface patches.
*cfun* The function giving the color
========== ================================================
'''
had_data = self.has_data()
rows, cols = Z.shape
tX, tY, tZ = np.transpose(X), np.transpose(Y), np.transpose(Z)
rstride = kwargs.pop('rstride', 10)
cstride = kwargs.pop('cstride', 10)
color = kwargs.pop('color', 'b')
color = np.array(colorConverter.to_rgba(color))
cmap = kwargs.get('cmap', None)
* cfun = kwargs.pop('cfun', None)*
polys = []
normals = []
avgz = []
* if not cfun:*
* cfun = lambda p:p[2]*
for rs in np.arange(0, rows-1, rstride):
for cs in np.arange(0, cols-1, cstride):
ps = []
corners = []
for a, ta in [(X, tX), (Y, tY), (Z, tZ)]:
ztop = a[rs][cs:min(cols, cs+cstride+1)]
zleft = ta[min(cols-1, cs+cstride)][rs:min(rows, rs+rstride+1)]
zbase = a[min(rows-1, rs+rstride)][cs:min(cols, cs+cstride+1):]
zbase = zbase[::-1]
zright = ta[cs][rs:min(rows, rs+rstride+1):]
zright = zright[::-1]
corners.append([ztop[0], ztop[-1], zbase[0], zbase[-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 = []
avgzsum = 0.0
for p in ps:
if p != lastp:
ps2.append(p)
lastp = p
*avgzsum += cfun(p)*
polys.append(ps2)
avgz.append(avgzsum / len(ps2))
v1 = np.array(ps2[0]) - np.array(ps2[1])
v2 = np.array(ps2[2]) - np.array(ps2[0])
normals.append(np.cross(v1, v2))
polyc = art3d.Poly3DCollection(polys, *args, **kwargs)
if cmap is not None:
polyc.set_array(np.array(avgz))
polyc.set_linewidth(0)
else:
colors = self._shade_colors(color, normals)
polyc.set_facecolors(colors)
self.add_collection(polyc)
self.auto_scale_xyz(X, Y, Z, had_data)
return polyc
|
|
From: Ola S. <ska...@si...> - 2010-06-11 08:05:11
|
Hi,
I'm trying to remove the xtickmarks and ytickmarks from a 3d plot,
without any success.
The example I experiment with is the following:
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
fig = plt.figure()
ax = axes3d.Axes3D(fig)
X, Y, Z = axes3d.get_test_data(0.05)
cset = ax.contour(X, Y, Z, 16, extend3d=True)
ax.clabel(cset, fontsize=9, inline=1)
#One try that didn't work
ax.set_xticklabels("")
plt.show()
It looks like the final plot ignores all my efforts in turning the
ticks off. Any help on this matter would be greatly appreciated.
Regards,
--
Ola Skavhaug
Research Programmer
Simula Research Laboratory
|