SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(7)
2
(8)
3
(3)
4
(5)
5
(2)
6
(3)
7
(4)
8
(11)
9
(4)
10
11
(8)
12
(10)
13
(16)
14
(14)
15
(13)
16
(1)
17
18
(8)
19
(6)
20
(13)
21
(15)
22
(5)
23
(13)
24
(2)
25
(4)
26
(1)
27
(4)
28
(8)
29
(11)
30
(5)
31
(3)






Showing results of 204

1 2 3 .. 9 > >> (Page 1 of 9)
From: Eric F. <ef...@ha...> - 2011年07月31日 18:09:37
On 07/31/2011 04:05 AM, Alan G Isaac wrote:
> On 7/30/2011 12:03 AM, Alan G Isaac wrote:
>> I'd like to pick the color for each line
>> based on its parameter value by mapping
>> possible parameter values to the colors
>> in a color map (e.g., gist_rainbow),
>> retrieving colors one at a time (based
>> on the parameter value for a line).
>
>
>
> As far as I can tell, the answer is the following.
> 1. scale the parameter to fall in (0,1)
> 2. get a color (rgba tuple) as cm.gist_rainbow(scaled_param)
> 3. plot using that color
For completeness: You can call a Colormap instance with either a float 
in (0,1), or equivalently with an integer in (0, N-1), where N is the 
number of discrete colors in the lookup table, excluding the over, 
under, and "bad" colors. The standard colormaps in cm are all created 
with N=mpl.rcParams['image.lut'], defaulting to 256, but you can make a 
colormap with any value of N.
Eric
>
> This works.
>
> Cheers,
> Alan Isaac
>
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Fernando P. <fpe...@gm...> - 2011年07月31日 17:20:17
Hi all,
on behalf of the IPython development team, I'm thrilled to announce,
after more than two years of development work, the official release of
IPython 0.11.
This release brings a long list of improvements and new features
(along with hopefully few new bugs). We have completely refactored
IPython, making it a much more friendly project to participate in by
having better separated and organized internals. We hope you will not
only use the new tools and libraries, but also join us with new ideas
and development.
After this very long development effort, we hope to make a few
stabilization releases at a quicker pace, where we iron out the kinks
in the new APIs and complete some remaining internal cleanup work. We
will then make a (long awaited) IPython 1.0 release with these stable
APIs.
*Downloads*
Download links and instructions are at: http://ipython.org/download.html
And IPython is also on PyPI: http://pypi.python.org/pypi/ipython
Those contain a built version of the HTML docs; if you want pure
source downloads with no docs, those are available on github:
Tarball: https://github.com/ipython/ipython/tarball/rel-0.11
Zipball: https://github.com/ipython/ipython/zipball/rel-0.11
* Features *
Here is a quick listing of the major new features:
- Standalone Qt console
- High-level parallel computing with ZeroMQ
- New model for GUI/plotting support in the terminal
- A two-process architecture
- Fully refactored internal project structure
- Vim integration
- Integration into Microsoft Visual Studio
- Improved unicode support
- Python 3 support
- New profile model
- SQLite storage for history
- New configuration system
- Pasting of code with prompts
And many more...
We closed over 500 tickets, merged over 200 pull requests, and more
than 60 people contributed over 2200 commits for the final release.
Please see our release notes for the full details on everything about
this release: https://github.com/ipython/ipython/zipball/rel-0.11
As usual, if you find any problem, please file a ticket --or even
better, a pull request fixing it-- on our github issues site
(https://github.com/ipython/ipython/issues/).
Many thanks to all who contributed!
Fernando, on behalf of the IPython development team.
http://ipython.org
From: Alan G I. <ala...@gm...> - 2011年07月31日 14:05:33
On 7/30/2011 12:03 AM, Alan G Isaac wrote:
> I'd like to pick the color for each line
> based on its parameter value by mapping
> possible parameter values to the colors
> in a color map (e.g., gist_rainbow),
> retrieving colors one at a time (based
> on the parameter value for a line).
As far as I can tell, the answer is the following.
1. scale the parameter to fall in (0,1)
2. get a color (rgba tuple) as cm.gist_rainbow(scaled_param)
3. plot using that color
This works.
Cheers,
Alan Isaac
From: Eric F. <ef...@ha...> - 2011年07月30日 18:31:17
On 07/29/2011 06:03 PM, Alan G Isaac wrote:
> I have many lines to plot.
> Each line has an associated parameter value.
> I'd like to pick the color for each line
> based on its parameter value by mapping
> possible parameter values to the colors
> in a color map (e.g., gist_rainbow),
> retrieving colors one at a time (based
> on the parameter value for a line).
>
> If two lines have the same parameter value,
> I need them to have exactly the same color.
>
> Hints?
Tony's reply may be the right approach for you; but an alternative, if 
you are plotting a set of lines all at once, is to use a LineCollection, 
which takes a colors kwarg. (Like all Collections, a LineCollection 
includes the cm.ScalarMappable mixin.) See 
http://matplotlib.sourceforge.net/examples/pylab_examples/line_collection2.html
but note that the lines within the collection don't have to have the 
same number of points.
Also, Tony's method could be modified easily to use a norm (e.g., an 
instance of colors.Normalize or of a subclass) in addition to a cmap.
Eric
>
> Thanks,
> Alan Isaac
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Tony Yu <ts...@gm...> - 2011年07月30日 16:07:34
Oops. I meant to reply to the list.
-Tony
---------- Forwarded message ----------
From: Tony Yu <ts...@gm...>
Date: Sat, Jul 30, 2011 at 10:46 AM
Subject: Re: [Matplotlib-users] parametric line color
To: Alan G Isaac <ala...@gm...>
On Sat, Jul 30, 2011 at 12:03 AM, Alan G Isaac <ala...@gm...> wrote:
> I have many lines to plot.
> Each line has an associated parameter value.
> I'd like to pick the color for each line
> based on its parameter value by mapping
> possible parameter values to the colors
> in a color map (e.g., gist_rainbow),
> retrieving colors one at a time (based
> on the parameter value for a line).
>
> If two lines have the same parameter value,
> I need them to have exactly the same color.
>
> Hints?
>
> Thanks,
> Alan Isaac
>
>
Here's a function to do what you want. (I haven't tested it much so it could
be buggy)
Best,
-Tony
#----
import matplotlib.pyplot as plt
def make_color_manager(parameter_range, cmap='YlOrBr', start=0, stop=255):
 """Return color manager, which returns color based on parameter value.
 Parameters
 ----------
 parameter_range : 2-tuple
 minimum and maximum value of parameter
 cmap : str
 name of a matplotlib colormap (see matplotlib.pyplot.cm)
 start, stop: int
 limit colormap to this range (0 <= start < stop <= 255)
 """
 colormap = getattr(plt.cm, cmap)
 pmin, pmax = parameter_range
 def color_manager(val):
 """Return color based on parameter value `val`."""
 assert pmin <= val <= pmax
 val_norm = (val - pmin) * float(stop - start) / (pmax - pmin)
 idx = int(val_norm) + start
 return colormap(idx)
 return color_manager
if __name__ == '__main__':
 cm = make_color_manager((5, 10), start=100)
 plt.plot([0, 1], color=cm(5))
 plt.plot([0.5, 0.5], color=cm(7.5))
 plt.plot([1, 0], color=cm(10))
 plt.legend(('val = 5', 'val = 7.5', 'val = 10'))
 plt.show()
From: Roy L. <roy...@gm...> - 2011年07月30日 13:51:59
Ben: That's what I did: plt.show() then plt.savefig(). I now know to reverse
the order. Thanks! - Roy
On Fri, Jul 29, 2011 at 7:32 PM, Benjamin Root <ben...@ou...> wrote:
> On Fri, Jul 29, 2011 at 6:19 PM, Roy Lowrance <roy...@gm...>wrote:
>
>> I'm using matplotlib on ubuntu 11.04.
>>
>> I create a figure and an axes and then show it via plt.show().
>>
>> From the window that plt.show() opens, I save the file to plot-3.png. This
>> works as I can open the file with evince.
>>
>> However, when my program executes plt.savefig('plot-3.png'), something is
>> saved as a file is created, but when I open the file with evince (or GIMP),
>> I see just the canvas, not the figure.
>>
>> How do I save under program control?
>>
>> - Roy
>>
>>
> There are a few common mistakes that might have happened. First, if you
> did a plt.show() and then closed the displayed figure, and *then* saved the
> figure, you will be saving the image of a new figure as you have already
> "destroyed" the old figure. If this is the case, put the savefig command
> *before* plt.show().
>
> Another possibility is that another figure was somehow created between the
> last plotting
> function and the call to savefig(). plt.savefig() assumes the current
> (active) figure, and so if another figure is accidentially created before
> calling savefig(), then you will be saving a blank figure.
>
> I hope this helps, and let us know if you have further questions!
> Ben Root
>
>
-- 
Roy Lowrance
home: 212 674 9777
mobile: 347 255 2544
From: Vidhu B. R V <vi...@gm...> - 2011年07月30日 04:57:49
Hello,
 I am trying to build the matplotlib sources, (because i cannot find a
version that works on my 64-bit Windows OS)
 I'm getting a linker error. Can somehelp help me see what i am missing?
 PS: Is there a ready build available for 64-bit Windows OS?
Many thanks.
VB
D:\System Downloads\matplotlib-1.0.1\matplotlib-1.0.1>d:\python\python
setup.py build
basedirlist is: ['win32_static']
============================================================================
BUILDING MATPLOTLIB
 matplotlib: 1.0.1
 python: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC
 v.1500 32 bit (Intel)]
 platform: win32
 Windows version: (6, 1, 7601, 2, 'Service Pack 1')
REQUIRED DEPENDENCIES
 numpy: 1.5.1
 freetype2: found, but unknown version (no pkg-config)
 * WARNING: Could not find 'freetype2' headers in any
 * of '.', '.\freetype2'.
OPTIONAL BACKEND DEPENDENCIES
 libpng: found, but unknown version (no pkg-config)
 * Could not find 'libpng' headers in any of '.'
 Tkinter: no
 * Tkinter present, but header files are not found.
 * You may need to install development packages.
 wxPython: no
 * wxPython not found
 Gtk+: no
 * Building for Gtk+ requires pygtk; you must be able
 * to "import gtk" in your build/install environment
 Mac OS X native: no
 Qt: no
 Qt4: no
 Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
 datetime: present, version unknown
 dateutil: matplotlib will provide
 pytz: matplotlib will provide
OPTIONAL USETEX DEPENDENCIES
 dvipng: file.
 ghostscript: 'gswin32c' is not recognized as an internal or
 external command, operable program or batch file.
 latex: no
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends',
'matplotlib.backends.qt4_editor', 'matplotlib.projec
ions', 'matplotlib.testing', 'matplotlib.testing.jpl_units',
'matplotlib.tests', 'mpl_toolkits', 'm
l_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1',
'mpl_toolkits.axisartist'
 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', '
matplotlib.numerix.ma',
matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array',
'matplotlib.numerix.fft', 'm
tplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil',
'dateutil/zoneinfo']
running build
running build_py
copying lib\matplotlib\mpl-data\matplotlibrc ->
build\lib.win32-2.6\matplotlib\mpl-data
copying lib\matplotlib\mpl-data\matplotlib.conf ->
build\lib.win32-2.6\matplotlib\mpl-data
running build_ext
building 'matplotlib.ft2font' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEB
G -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-Id:\python\lib\site-packages\numpy\
ore\include -I. -Id:\python\lib\site-packages\numpy\core\include\freetype2
-I.\freetype2 -I.\lib/fr
etype2/include -Id:\python\include -Id:\python\PC /Tpsrc/ft2font.cpp
/Fobuild\temp.win32-2.6\Releas
\src/ft2font.obj
ft2font.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C4530: C++ exc
ption handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEB
G -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-Id:\python\lib\site-packages\numpy\
ore\include -I. -Id:\python\lib\site-packages\numpy\core\include\freetype2
-I.\freetype2 -I.\lib/fr
etype2/include -Id:\python\include -Id:\python\PC /Tpsrc/mplutils.cpp
/Fobuild\temp.win32-2.6\Relea
e\src/mplutils.obj
mplutils.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C4530: C++ exc
ption handler used, but unwind semantics are not enabled. Specify /EHsc
src/mplutils.cpp(19) : warning C4996: 'vsprintf': This function or variable
may be unsafe. Consider
using vsprintf_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for
etails.
 C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdio.h(366) : see declaratio
 of 'vsprintf'
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEB
G -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-Id:\python\lib\site-packages\numpy\
ore\include -I. -Id:\python\lib\site-packages\numpy\core\include\freetype2
-I.\freetype2 -I.\lib/fr
etype2/include -Id:\python\include -Id:\python\PC /TpCXX\cxxsupport.cxx
/Fobuild\temp.win32-2.6\Rel
ase\CXX\cxxsupport.obj
cxxsupport.cxx
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C4530: C++ exc
ption handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEB
G -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-Id:\python\lib\site-packages\numpy\
ore\include -I. -Id:\python\lib\site-packages\numpy\core\include\freetype2
-I.\freetype2 -I.\lib/fr
etype2/include -Id:\python\include -Id:\python\PC /TpCXX\cxx_extensions.cxx
/Fobuild\temp.win32-2.6
Release\CXX\cxx_extensions.obj
cxx_extensions.cxx
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C4530: C++ exc
ption handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEB
G -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-Id:\python\lib\site-packages\numpy\
ore\include -I. -Id:\python\lib\site-packages\numpy\core\include\freetype2
-I.\freetype2 -I.\lib/fr
etype2/include -Id:\python\include -Id:\python\PC
/TpCXX\IndirectPythonInterface.cxx /Fobuild\temp.
in32-2.6\Release\CXX\IndirectPythonInterface.obj
IndirectPythonInterface.cxx
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEB
G -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-Id:\python\lib\site-packages\numpy\
ore\include -I. -Id:\python\lib\site-packages\numpy\core\include\freetype2
-I.\freetype2 -I.\lib/fr
etype2/include -Id:\python\include -Id:\python\PC /TcCXX\cxxextensions.c
/Fobuild\temp.win32-2.6\Re
ease\CXX\cxxextensions.obj
cxxextensions.c
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL
/nologo /INCREMENTAL:NO /LI
PATH:d:\python\libs /LIBPATH:d:\python\PCbuild freetype.lib z.lib
/EXPORT:initft2font build\temp.wi
32-2.6\Release\src/ft2font.obj build\temp.win32-2.6\Release\src/mplutils.obj
build\temp.win32-2.6\R
lease\CXX\cxxsupport.obj build\temp.win32-2.6\Release\CXX\cxx_extensions.obj
build\temp.win32-2.6\R
lease\CXX\IndirectPythonInterface.obj
build\temp.win32-2.6\Release\CXX\cxxextensions.obj /OUT:build
lib.win32-2.6\matplotlib\ft2font.pyd
/IMPLIB:build\temp.win32-2.6\Release\src\ft2font.lib /MANIFEST
ILE:build\temp.win32-2.6\Release\src\ft2font.pyd.manifest
 Creating library build\temp.win32-2.6\Release\src\ft2font.lib and object
build\temp.win32-2.6\Re
ease\src\ft2font.exp
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Set_Transform referenced in funct
on "public: class Py::Object __thiscall FT2Font::set_size(class Py::Tuple
const &)" (?set_size@FT2F
nt@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Set_Char_Size referenced in funct
on "public: class Py::Object __thiscall FT2Font::set_size(class Py::Tuple
const &)" (?set_size@FT2F
nt@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Set_Charmap referenced in functio
 "public: class Py::Object __thiscall FT2Font::set_charmap(class Py::Tuple
const &)" (?set_charmap@
T2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Select_Charmap referenced in func
ion "public: class Py::Object __thiscall FT2Font::select_charmap(class
Py::Tuple const &)" (?select
charmap@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Glyph_Get_CBox referenced in func
ion "private: struct FT_BBox_ __thiscall FT2Font::compute_string_bbox(void)"
(?compute_string_bbox@
T2Font@@AAE?AUFT_BBox_@@XZ)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Kerning referenced in functio
 "public: class Py::Object __thiscall FT2Font::get_kerning(class Py::Tuple
const &)" (?get_kerning@
T2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Glyph_Name referenced in func
ion "public: class Py::Object __thiscall FT2Font::get_glyph_name(class
Py::Tuple const &)" (?get_gl
ph_name@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Name_Index referenced in func
ion "public: class Py::Object __thiscall FT2Font::get_name_index(class
Py::Tuple const &)" (?get_na
e_index@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Done_FreeType referenced in funct
on "public: virtual __thiscall ft2font_module::~ft2font_module(void)" (
??1ft2font_module@@UAE@XZ)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Glyph_To_Bitmap referenced in fun
tion "public: class Py::Object __thiscall FT2Font::get_xys(class Py::Tuple
const &)" (?get_xys@FT2F
nt@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_PS_Font_Info referenced in fu
ction "public: class Py::Object __thiscall FT2Font::get_ps_font_info(class
Py::Tuple const &)" (?ge
_ps_font_info@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Attach_File referenced in functio
 "public: class Py::Object __thiscall FT2Font::attach_file(class Py::Tuple
const &)" (?attach_file@
T2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Next_Char referenced in funct
on "public: class Py::Object __thiscall FT2Font::get_charmap(class Py::Tuple
const &)" (?get_charma
@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_First_Char referenced in func
ion "public: class Py::Object __thiscall FT2Font::get_charmap(class
Py::Tuple const &)" (?get_charm
p@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Sfnt_Name referenced in funct
on "public: class Py::Object __thiscall FT2Font::get_sfnt(class Py::Tuple
const &)" (?get_sfnt@FT2F
nt@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Sfnt_Name_Count referenced in
function "public: class Py::Object __thiscall FT2Font::get_sfnt(class
Py::Tuple const &)" (?get_sfn
@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Sfnt_Table referenced in func
ion "public: class Py::Object __thiscall FT2Font::get_sfnt_table(class
Py::Tuple const &)" (?get_sf
t_table@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol __imp__FT_Done_Glyph
referenced in function
"public: virtual __thiscall FT2Font::~FT2Font(void)" (??1FT2Font@@UAE@XZ)
ft2font.obj : error LNK2019: unresolved external symbol __imp__FT_Done_Face
referenced in function
public: virtual __thiscall FT2Font::~FT2Font(void)" (??1FT2Font@@UAE@XZ)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Postscript_Name referenced in
function "public: __thiscall FT2Font::FT2Font(class
std::basic_string<char,struct std::char_traits<
har>,class std::allocator<char> >)" (
??0FT2Font@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allo
ator@D@2@@std@@@Z)
ft2font.obj : error LNK2019: unresolved external symbol __imp__FT_New_Face
referenced in function "
ublic: __thiscall FT2Font::FT2Font(class std::basic_string<char,struct
std::char_traits<char>,class
std::allocator<char> >)" (
??0FT2Font@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@
td@@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Glyph_Transform referenced in fun
tion "public: class Py::Object __thiscall FT2Font::set_text(class Py::Tuple
const &,class Py::Dict
onst &)" (?set_text@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@ABVDict@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol __imp__FT_Get_Glyph
referenced in function
public: class Py::Object __thiscall FT2Font::set_text(class Py::Tuple const
&,class Py::Dict const
)" (?set_text@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@ABVDict@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol __imp__FT_Load_Glyph
referenced in function
"public: class Py::Object __thiscall FT2Font::set_text(class Py::Tuple const
&,class Py::Dict const
&)" (?set_text@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@ABVDict@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Get_Char_Index referenced in func
ion "public: class Py::Object __thiscall FT2Font::set_text(class Py::Tuple
const &,class Py::Dict c
nst &)" (?set_text@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@ABVDict@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol __imp__FT_Load_Char
referenced in function
public: class Py::Object __thiscall FT2Font::load_char(class Py::Tuple const
&,class Py::Dict const
&)" (?load_char@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@ABVDict@3@@Z)
ft2font.obj : error LNK2019: unresolved external symbol
__imp__FT_Init_FreeType referenced in funct
on "void __cdecl initft2font(void)" (?initft2font@@YAXXZ)
build\lib.win32-2.6\matplotlib\ft2font.pyd : fatal error LNK1120: 27
unresolved externals
error: command '"C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\link.exe"' failed with e
it status 1120
From: Alan G I. <ala...@gm...> - 2011年07月30日 04:04:29
I have many lines to plot.
Each line has an associated parameter value.
I'd like to pick the color for each line
based on its parameter value by mapping
possible parameter values to the colors
in a color map (e.g., gist_rainbow),
retrieving colors one at a time (based
on the parameter value for a line).
If two lines have the same parameter value,
I need them to have exactly the same color.
Hints?
Thanks,
Alan Isaac
From: Benjamin R. <ben...@ou...> - 2011年07月29日 23:32:21
On Fri, Jul 29, 2011 at 6:19 PM, Roy Lowrance <roy...@gm...>wrote:
> I'm using matplotlib on ubuntu 11.04.
>
> I create a figure and an axes and then show it via plt.show().
>
> From the window that plt.show() opens, I save the file to plot-3.png. This
> works as I can open the file with evince.
>
> However, when my program executes plt.savefig('plot-3.png'), something is
> saved as a file is created, but when I open the file with evince (or GIMP),
> I see just the canvas, not the figure.
>
> How do I save under program control?
>
> - Roy
>
>
There are a few common mistakes that might have happened. First, if you did
a plt.show() and then closed the displayed figure, and *then* saved the
figure, you will be saving the image of a new figure as you have already
"destroyed" the old figure. If this is the case, put the savefig command
*before* plt.show().
Another possibility is that another figure was somehow created between the
last plotting
function and the call to savefig(). plt.savefig() assumes the current
(active) figure, and so if another figure is accidentially created before
calling savefig(), then you will be saving a blank figure.
I hope this helps, and let us know if you have further questions!
Ben Root
From: Roy L. <roy...@gm...> - 2011年07月29日 23:19:26
I'm using matplotlib on ubuntu 11.04.
I create a figure and an axes and then show it via plt.show().
>From the window that plt.show() opens, I save the file to plot-3.png. This
works as I can open the file with evince.
However, when my program executes plt.savefig('plot-3.png'), something is
saved as a file is created, but when I open the file with evince (or GIMP),
I see just the canvas, not the figure.
How do I save under program control?
- Roy
From: Mátyás J. <mj...@gm...> - 2011年07月29日 22:07:23
Dear users,
I would like to draw lines with fixed pixel thickness, for example 1,
2, or 3 pixels, which remains 1 pixel, even if I zoom in and out the
graph in my interactive application. How can I do this with matplotlib?
I tried to set linewidth to 1 on creating LineCollection, but this
creates too thick lines. If I set it to 0.25 or 0.1, for example, then
some lines on the screen are thin, but some line instances are
simply missing (not visible), depending on the zoom.
Thank you for your help,
János
From: Benjamin R. <ben...@ou...> - 2011年07月29日 20:22:55
On Fri, Jul 29, 2011 at 3:12 PM, shooter123 <fr...@gm...> wrote:
>
> Hi,
>
> In the following example -
> http://matplotlib.sourceforge.net/examples/mplot3d/hist3d_demo.html
> how can I set custom tick labels for x and y axes?
> My plot dissappears when using ax.set_xticks
>
Using ax.set_xticks() won't work (at least, not until the upcoming release
where I fixed this). Try ax.w_xaxis.set_ticks() as a work-around.
Ben Root
From: shooter123 <fr...@gm...> - 2011年07月29日 20:12:36
Hi,
In the following example -
http://matplotlib.sourceforge.net/examples/mplot3d/hist3d_demo.html
how can I set custom tick labels for x and y axes?
My plot dissappears when using ax.set_xticks
-- 
View this message in context: http://old.nabble.com/How-to-set-custom-tick-labels-for-bar3d-plot-tp32161706p32161706.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Michael D. <md...@st...> - 2011年07月29日 18:01:20
You need to be able to build matplotlib from source (which implies 
having a compiler etc., which may or may not be easy on your platform). 
The basic instructions for building from source are here:
http://matplotlib.sourceforge.net/users/installing.html
and the branch containing the locale fix is available for git checkout 
or download as a tarball here:
https://github.com/mdboom/matplotlib/tree/locale_formatting
Mike
On 07/29/2011 01:14 PM, José Alexandre Nalon wrote:
> Hello,
>
> Thanks for your work! But, since I don't have much experience
> with dealing with the sources and compiling, I don't know
> exactly how to apply this patch. Is there a guide to applying
> patches to matplotlib or something like that? Any help will
> be appreciated.
>
> ---
> José Alexandre Nalon
> na...@te...
>
>
> Em 29/07/2011, às 12:08, Michael Droettboom escreveu:
>
>> There isn't a really good way to do this at present. Maybe someone can
>> suggest a workaround that doesn't require modifying matplotlib.
>>
>> However, I was able to produce a patch that will respect the user's
>> current locale here:
>>
>> https://github.com/matplotlib/matplotlib/pull/410
>>
>> Cheers,
>> Mike
>>
>> On 07/28/2011 06:46 PM, José Alexandre Nalon wrote:
>>> Hello,
>>>
>>> Sorry if this question was answered before. I did a search in the
>>> mailing list archives but couldn't find any answer.
>>>
>>> Is there an easy way to use comma as a decimal separator in texts,
>>> especially in tick labels? I know that it is possible to user
>>> formatters to do that, but I was wondering if there is an automatic
>>> setting or something that could be applied to axes instances, as I
>>> have more than 200 scripts to generate plots and I don't want to
>>> edit every one of them. Maybe there is a TeX setting (I uset
>>> usetex=True)?
>>>
>>> I tried setting locales, but it didn't work. I also tried to
>>> process the texts in the tick labels, but that didn't work also.
>>> Maybe I am overseeing something, but any hint would help.
>>>
>>> Thanks in advance:
>>>
>>> ---
>>> José Alexandre Nalon
>>> na...@te...
>>>
>>> ------------------------------------------------------------------------------
>>> Got Input? Slashdot Needs You.
>>> Take our quick survey online. Come on, we don't ask for help often.
>>> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
>>> http://p.sf.net/sfu/slashdot-survey
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> ------------------------------------------------------------------------------
>> Got Input? Slashdot Needs You.
>> Take our quick survey online. Come on, we don't ask for help often.
>> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
>> http://p.sf.net/sfu/slashdot-survey
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: José A. N. <na...@te...> - 2011年07月29日 17:45:56
Hello,
Thanks for your work! But, since I don't have much experience
with dealing with the sources and compiling, I don't know
exactly how to apply this patch. Is there a guide to applying
patches to matplotlib or something like that? Any help will
be appreciated.
---
José Alexandre Nalon
na...@te...
Em 29/07/2011, às 12:08, Michael Droettboom escreveu:
> There isn't a really good way to do this at present. Maybe someone can 
> suggest a workaround that doesn't require modifying matplotlib.
> 
> However, I was able to produce a patch that will respect the user's 
> current locale here:
> 
> https://github.com/matplotlib/matplotlib/pull/410
> 
> Cheers,
> Mike
> 
> On 07/28/2011 06:46 PM, José Alexandre Nalon wrote:
>> Hello,
>> 
>> Sorry if this question was answered before. I did a search in the
>> mailing list archives but couldn't find any answer.
>> 
>> Is there an easy way to use comma as a decimal separator in texts,
>> especially in tick labels? I know that it is possible to user
>> formatters to do that, but I was wondering if there is an automatic
>> setting or something that could be applied to axes instances, as I
>> have more than 200 scripts to generate plots and I don't want to
>> edit every one of them. Maybe there is a TeX setting (I uset
>> usetex=True)?
>> 
>> I tried setting locales, but it didn't work. I also tried to
>> process the texts in the tick labels, but that didn't work also.
>> Maybe I am overseeing something, but any hint would help.
>> 
>> Thanks in advance:
>> 
>> ---
>> José Alexandre Nalon
>> na...@te...
>> 
>> ------------------------------------------------------------------------------
>> Got Input? Slashdot Needs You.
>> Take our quick survey online. Come on, we don't ask for help often.
>> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
>> http://p.sf.net/sfu/slashdot-survey
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Jeremy L. D. I. <jl...@dy...> - 2011年07月29日 17:32:54
Hello,
I found the following page on running Python using "parallel processing",
but I have no idea which one would be most compatible with matplotlib and
basemap.
http://wiki.python.org/moin/ParallelProcessing
Any help would be greatly appreciated. I looked through the archives and it
looks like in 2009 at the conference there was a session on using mpi4py;
is that still the best option?
Thank you in advance.
Sincerely,
Jeremy Lounds
From: Benjamin R. <ben...@ou...> - 2011年07月29日 16:28:56
On Thu, Jul 28, 2011 at 8:44 PM, Joseph Costlow <jos...@gm...>wrote:
> This is a small omission, and I think most people would figure it out, but
> I thought it might be worth mentioning:
>
> Page:
> http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#working-with-multiple-figures-and-axes
>
> The code example, both on the page, and the link is missing:
>
> plt.show()
>
> Best,
>
> Joe
>
>
Actually, all of the examples (on that page) seem to be missing plt.show().
But, in defense of what is currently there, they are also missing the import
calls as well. Presumedly, one could assume that interactive mode was on,
but this isn't given, either.
I am torn on this one. On one hand, there is something to be said for
simplicity and focusing only on the relevant part of the code. On the other
hand, explicit code examples would reduce ambiguity.
What do others think?
Ben Root
From: Michael D. <md...@st...> - 2011年07月29日 15:08:38
There isn't a really good way to do this at present. Maybe someone can 
suggest a workaround that doesn't require modifying matplotlib.
However, I was able to produce a patch that will respect the user's 
current locale here:
https://github.com/matplotlib/matplotlib/pull/410
Cheers,
Mike
On 07/28/2011 06:46 PM, José Alexandre Nalon wrote:
> Hello,
>
> Sorry if this question was answered before. I did a search in the
> mailing list archives but couldn't find any answer.
>
> Is there an easy way to use comma as a decimal separator in texts,
> especially in tick labels? I know that it is possible to user
> formatters to do that, but I was wondering if there is an automatic
> setting or something that could be applied to axes instances, as I
> have more than 200 scripts to generate plots and I don't want to
> edit every one of them. Maybe there is a TeX setting (I uset
> usetex=True)?
>
> I tried setting locales, but it didn't work. I also tried to
> process the texts in the tick labels, but that didn't work also.
> Maybe I am overseeing something, but any hint would help.
>
> Thanks in advance:
>
> ---
> José Alexandre Nalon
> na...@te...
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Joseph C. <jos...@gm...> - 2011年07月29日 01:52:28
This is a small omission, and I think most people would figure it out, but I
thought it might be worth mentioning:
Page:
http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#working-with-multiple-figures-and-axes
The code example, both on the page, and the link is missing:
plt.show()
Best,
Joe
From: José A. N. <na...@te...> - 2011年07月28日 22:46:52
Hello,
Sorry if this question was answered before. I did a search in the
mailing list archives but couldn't find any answer.
Is there an easy way to use comma as a decimal separator in texts,
especially in tick labels? I know that it is possible to user 
formatters to do that, but I was wondering if there is an automatic
setting or something that could be applied to axes instances, as I 
have more than 200 scripts to generate plots and I don't want to 
edit every one of them. Maybe there is a TeX setting (I uset 
usetex=True)?
I tried setting locales, but it didn't work. I also tried to
process the texts in the tick labels, but that didn't work also.
Maybe I am overseeing something, but any hint would help.
Thanks in advance:
---
José Alexandre Nalon
na...@te...
From: Andre' Walker-L. <wal...@gm...> - 2011年07月28日 19:47:37
well I knew there was a better solution, thanks.
I guess I'll just have to upgrade my installation.
Andre
On Jul 28, 2011, at 12:44 PM, Ben Breslauer wrote:
> Hmm, no, it looks like the tick_params were added in 1.0. I can also get it to work using
> 
> plt.setp(ax.xaxis.get_ticklines(minor=False), markersize=10)
> 
> but I'm using matplotlib 1.0.1. I'm not sure if neither of those solutions work.
> 
> Ben
> 
> On Thu, Jul 28, 2011 at 3:30 PM, Andre' Walker-Loud <wal...@gm...> wrote:
> Hi Ben,
> 
> Would you expect this to work on Matplotlib 0.99.3?
> 
> I get the following error
> 
> AttributeError: 'XAxis' object has no attribute 'set_tick_params'
> 
> 
> Thanks,
> 
> 
> Andre
> 
> 
> On Jul 28, 2011, at 12:18 PM, Ben Breslauer wrote:
> 
>> Hi Andre,
>> 
>> You should be able to set the size with the following:
>> 
>> params = {'length': 10}
>> axis = plt.axes().xaxis
>> axis.set_tick_params(which='major', **params)
>> 
>> You can also use 'minor' instead of 'major' to set the minor ticks. There are a number of different valid values for the params dict, including direction, width, and color.
>> 
>> Ben
>> 
>> On Thu, Jul 28, 2011 at 2:22 PM, Andre' Walker-Loud <wal...@gm...> wrote:
>> Hi All,
>> 
>> I am trying to modify tick sizes and labels. Reading documents and examples, I have found an easy way to modify the labels,
>> 
>> > import matplotlib.pyplot as plt
>> >
>> > ax = plt.axes()
>> > font_size = 24
>> >
>> > plt.setp(ax.get_xticklabels(),fontsize=font_size)
>> 
>> 
>> but I am struggling to find such a nice solution for the tick size. I would like to change the size of the major and minor ticks independently. But the best I have come up with so far is a brute force double loop (I tried calling "major=False" but "major" is not a recognized kwarg)
>> 
>> > for tick in ax.xaxis.get_ticklines(minor=True):
>> > tick.set_markersize(5)
>> > for tick in ax.xaxis.get_ticklines(minor=False):
>> > tick.set_markersize(10)
>> 
>> 
>> I assume there is some nice solution like for the tick labels, but I have not found it.
>> 
>> Anyone figured this one out yet?
>> 
>> 
>> Thanks,
>> 
>> Andre
>> ------------------------------------------------------------------------------
>> Got Input? Slashdot Needs You.
>> Take our quick survey online. Come on, we don't ask for help often.
>> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
>> http://p.sf.net/sfu/slashdot-survey
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
> 
> 
From: Ben B. <bbr...@gm...> - 2011年07月28日 19:45:16
Hmm, no, it looks like the tick_params were added in 1.0. I can also get it
to work using
plt.setp(ax.xaxis.get_ticklines(minor=False), markersize=10)
but I'm using matplotlib 1.0.1. I'm not sure if neither of those solutions
work.
Ben
On Thu, Jul 28, 2011 at 3:30 PM, Andre' Walker-Loud <wal...@gm...>wrote:
> Hi Ben,
>
> Would you expect this to work on Matplotlib 0.99.3?
>
> I get the following error
>
> AttributeError: 'XAxis' object has no attribute 'set_tick_params'
>
>
> Thanks,
>
>
> Andre
>
>
> On Jul 28, 2011, at 12:18 PM, Ben Breslauer wrote:
>
> Hi Andre,
>
> You should be able to set the size with the following:
>
> params = {'length': 10}
> axis = plt.axes().xaxis
> axis.set_tick_params(which='major', **params)
>
> You can also use 'minor' instead of 'major' to set the minor ticks. There
> are a number of different valid values for the params dict, including
> direction, width, and color.
>
> Ben
>
> On Thu, Jul 28, 2011 at 2:22 PM, Andre' Walker-Loud <wal...@gm...>wrote:
>
>> Hi All,
>>
>> I am trying to modify tick sizes and labels. Reading documents and
>> examples, I have found an easy way to modify the labels,
>>
>> > import matplotlib.pyplot as plt
>> >
>> > ax = plt.axes()
>> > font_size = 24
>> >
>> > plt.setp(ax.get_xticklabels(),fontsize=font_size)
>>
>>
>> but I am struggling to find such a nice solution for the tick size. I
>> would like to change the size of the major and minor ticks independently.
>> But the best I have come up with so far is a brute force double loop (I
>> tried calling "major=False" but "major" is not a recognized kwarg)
>>
>> > for tick in ax.xaxis.get_ticklines(minor=True):
>> > tick.set_markersize(5)
>> > for tick in ax.xaxis.get_ticklines(minor=False):
>> > tick.set_markersize(10)
>>
>>
>> I assume there is some nice solution like for the tick labels, but I have
>> not found it.
>>
>> Anyone figured this one out yet?
>>
>>
>> Thanks,
>>
>> Andre
>>
>> ------------------------------------------------------------------------------
>> Got Input? Slashdot Needs You.
>> Take our quick survey online. Come on, we don't ask for help often.
>> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
>> http://p.sf.net/sfu/slashdot-survey
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
From: Andre' Walker-L. <wal...@gm...> - 2011年07月28日 19:30:46
Hi Ben,
Would you expect this to work on Matplotlib 0.99.3?
I get the following error
AttributeError: 'XAxis' object has no attribute 'set_tick_params'
Thanks,
Andre
On Jul 28, 2011, at 12:18 PM, Ben Breslauer wrote:
> Hi Andre,
> 
> You should be able to set the size with the following:
> 
> params = {'length': 10}
> axis = plt.axes().xaxis
> axis.set_tick_params(which='major', **params)
> 
> You can also use 'minor' instead of 'major' to set the minor ticks. There are a number of different valid values for the params dict, including direction, width, and color.
> 
> Ben
> 
> On Thu, Jul 28, 2011 at 2:22 PM, Andre' Walker-Loud <wal...@gm...> wrote:
> Hi All,
> 
> I am trying to modify tick sizes and labels. Reading documents and examples, I have found an easy way to modify the labels,
> 
> > import matplotlib.pyplot as plt
> >
> > ax = plt.axes()
> > font_size = 24
> >
> > plt.setp(ax.get_xticklabels(),fontsize=font_size)
> 
> 
> but I am struggling to find such a nice solution for the tick size. I would like to change the size of the major and minor ticks independently. But the best I have come up with so far is a brute force double loop (I tried calling "major=False" but "major" is not a recognized kwarg)
> 
> > for tick in ax.xaxis.get_ticklines(minor=True):
> > tick.set_markersize(5)
> > for tick in ax.xaxis.get_ticklines(minor=False):
> > tick.set_markersize(10)
> 
> 
> I assume there is some nice solution like for the tick labels, but I have not found it.
> 
> Anyone figured this one out yet?
> 
> 
> Thanks,
> 
> Andre
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Ben B. <bbr...@gm...> - 2011年07月28日 19:19:23
Hi Andre,
You should be able to set the size with the following:
params = {'length': 10}
axis = plt.axes().xaxis
axis.set_tick_params(which='major', **params)
You can also use 'minor' instead of 'major' to set the minor ticks. There
are a number of different valid values for the params dict, including
direction, width, and color.
Ben
On Thu, Jul 28, 2011 at 2:22 PM, Andre' Walker-Loud <wal...@gm...>wrote:
> Hi All,
>
> I am trying to modify tick sizes and labels. Reading documents and
> examples, I have found an easy way to modify the labels,
>
> > import matplotlib.pyplot as plt
> >
> > ax = plt.axes()
> > font_size = 24
> >
> > plt.setp(ax.get_xticklabels(),fontsize=font_size)
>
>
> but I am struggling to find such a nice solution for the tick size. I
> would like to change the size of the major and minor ticks independently.
> But the best I have come up with so far is a brute force double loop (I
> tried calling "major=False" but "major" is not a recognized kwarg)
>
> > for tick in ax.xaxis.get_ticklines(minor=True):
> > tick.set_markersize(5)
> > for tick in ax.xaxis.get_ticklines(minor=False):
> > tick.set_markersize(10)
>
>
> I assume there is some nice solution like for the tick labels, but I have
> not found it.
>
> Anyone figured this one out yet?
>
>
> Thanks,
>
> Andre
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win 100ドル to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Andre' Walker-L. <wal...@gm...> - 2011年07月28日 18:22:48
Hi All,
I am trying to modify tick sizes and labels. Reading documents and examples, I have found an easy way to modify the labels,
> import matplotlib.pyplot as plt
>
> ax = plt.axes()
> font_size = 24
>
> plt.setp(ax.get_xticklabels(),fontsize=font_size)
but I am struggling to find such a nice solution for the tick size. I would like to change the size of the major and minor ticks independently. But the best I have come up with so far is a brute force double loop (I tried calling "major=False" but "major" is not a recognized kwarg)
> for tick in ax.xaxis.get_ticklines(minor=True):
> tick.set_markersize(5)
> for tick in ax.xaxis.get_ticklines(minor=False):
> tick.set_markersize(10)
I assume there is some nice solution like for the tick labels, but I have not found it.
Anyone figured this one out yet?
Thanks,
Andre
3 messages has been excluded from this view by a project administrator.

Showing results of 204

1 2 3 .. 9 > >> (Page 1 of 9)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /