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
(5) |
3
(18) |
4
(9) |
5
(13) |
6
(14) |
7
(8) |
8
(7) |
|
9
(6) |
10
(6) |
11
(24) |
12
(14) |
13
(9) |
14
(21) |
15
(6) |
|
16
(1) |
17
(20) |
18
(42) |
19
(16) |
20
(21) |
21
(41) |
22
(13) |
|
23
(11) |
24
(15) |
25
(32) |
26
(27) |
27
(29) |
28
(10) |
29
(3) |
|
30
(1) |
31
(5) |
|
|
|
|
|
|
From: Chris W. <ch...@si...> - 2008-03-18 11:15:45
|
Chris Withers wrote:
> I tried fiddling with the zorder of the plot and the grid but nothing
> had any effect. What am I doing wrong? How do I get the grid to show up
> behind the lines?
Actually, I did manage to fix this by specifying a zorder of 10 for the
plots and a zorder of 1 for the grids.
What's the default zorder? Ideally I'd just like to supply the zorder to
the grids...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Chris W. <ch...@si...> - 2008-03-18 11:11:50
|
Matthias Michler wrote:
> ax.yaxis.grid(which='minor')
This is what I was after, thankyou :-)
However, the lines show up on top of the lines plotted, not behind them
as I'd expect.
I tried fiddling with the zorder of the plot and the grid but nothing
had any effect. What am I doing wrong? How do I get the grid to show up
behind the lines?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Chris W. <ch...@si...> - 2008-03-18 11:00:13
|
Hi All,
A few of the units demos include the lines:
from pylab import nx
...but this import errors for me.
Why is that?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Matthias M. <Mat...@gm...> - 2008-03-18 10:37:39
|
Hello Lorenzo,
maybe you don't really use Tex to build the labels and mathtext does not
support any Tex-functionality.
if you use:
------------------------------------
from matplotlib import rc
rc('text', usetex=True)
import pylab as p
------------------------------------
it should work. Alternatively you could modify your matplotlibrc directly.
best regards
Matthias
On Tuesday 18 March 2008 10:39, Lorenzo Isella wrote:
> Dear All,
> I think the solution to my problem must be a one-liner, but I have
> been unsuccessful.
> I am trying to use latex formulas (nothing dramatically complicated)
> inside a figure.
> I suppose everything is working correctly on my system.
> I tried running the example at:
> http://www.scipy.org/Cookbook/Matplotlib/UsingTex
> and it works fine.
> But now have a look at this:
>
> #! /usr/bin/env python
>
> import scipy as s
> import numpy as n
> import pylab as p
>
> x=s.linspace(0.,(2.*s.pi),100)
> y=s.sin(x)
>
> z=s.exp(-x)
>
> #Now I create my figure
>
> fig = p.figure()
> axes = fig.gca()
>
> axes.plot(x,y, "bo",label=(r"$sin(\tau)$"))
> axes.plot(x,z,'--r',label=(r"$\rm{decay}exp(\tau) $"),linewidth=2.)
> p.xlabel('This is $\tau$')
> p.ylabel('$N_\infty(\tau)$')
> axes.legend()
> p.title('My test functions')
> p.grid(True)
> p.savefig("simple_test.pdf")
>
> p.clf()
>
> The point of the example figure is to try mixing latex formulas and text.
> Obviously, the result is not satisfactory. If I use \sin for instance,
> then I get an error message as that is not recognized.
> I think the fix to this must be rather simple for someone
> knowledgeable, but so far my attempts to get some decent mixed
> latex/text output have been unsuccessful.
> Can anyone help me with this simple example code?
> Many thanks
>
> Lorenzo
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Matthias M. <Mat...@gm...> - 2008-03-18 10:31:22
|
On Tuesday 18 March 2008 10:50, Chris Withers wrote:
> Eric Firing wrote:
> > It sounds like what you want it the pyplot figlegend command:
> > def figlegend(handles, labels, loc, **kwargs):
>
> This feels like what I should be wanting except:
>
> - why does it need explicit parameters? why can't it pick up its lines
> and labels automatically, like legend does?
- I think this could be a good improvement, but i'm not sure if it is easy to
expand the functionality of the axes-legend (pyplot.legend or ax.legend) to
that of a figure-legend(pyplot.figlegend or fig.legend with fig as a figure
instance) without missing something, because there is no axes specified and
therefore it is not obvious which lines should be displayed. In that case the
default behaviour might become to take all lines from all axes and that's not
what one always needs, or isn't it?
In this case one should do it autonomous like:
ax1 = subplot(111)
# some plotting commands
labels = []
for line in ax1.lines:
label = line.get_label()
labels.append(label)
# or in one line:
# labels = [line.get_label() for line in ax1.lines]
figlegend(ax1.lines, labels, 'upper right')
> - it places the legend over the top of the current chart, I want it to
> the right, so it doesn't obscure the information on the chart...
That's true and I have no idea how to overcome that (except for example
subplot_adjust(top=0.8)).
> > or you could directly use the Figure.legend method.
>
> How does this differ from the normal legend command?
> How do I get hold of a figure to call its legend method?
fig=figure()
fig.legend( ... )
and it is wrapped by
figlegend( ... )
and therefore has the same functionality / arguments
and it differs from the axes-legend like explained above ...
> How does figure.legend interact with subplots?
I'm don't know, but maybe it doesn't interact with the axes / subplots at all.
> I have a bout 6 subplots on the same figure(?) and they each need to
> have a legend which is not obscuring the data plotted and isn't
> obscuring any other figure...
I think in that case the axes-legend is the preferred one, but I have no idea
how to ensure that nothing is cover by the legend without difficult tuning of
the parameters or at least ensure that all labels have the same widths.
best regards
Matthias
|
|
From: Matthias M. <Mat...@gm...> - 2008-03-18 10:07:51
|
Hello Chris, for only horizontal lines you can use 'ax.yaxis.grid' like: --------------------------------------------------- from pylab import * figure() ax = axes() ax.set_yticks([0.0,0.5,1.0], minor=False) ax.set_yticks(list(linspace(0.0, 1.0, 11)), minor=True) ax.yaxis.grid(which='minor') show() --------------------------------------------------- best regards, Matthias On Tuesday 18 March 2008 10:22, Chris Withers wrote: > Eric Firing wrote: > >> I can get the major ticks to show by doing grid(True), but how do I > >> get the same effect for minor ticks? > > > > Try > > > > grid(True, which='minor') > > Thanks, that worked (well, it did what it was supposed to...) so it'd be > nice if it was in the online docs as well as the docstring of the method;-) > > However, this isn't quite what I want... I only want the grid for the > y-axis (ie: horizontal lines in the grid, but no vertical), how would I > do that? > > cheers, > > Chris |
|
From: Chris W. <ch...@si...> - 2008-03-18 09:50:55
|
Eric Firing wrote:
> It sounds like what you want it the pyplot figlegend command:
> def figlegend(handles, labels, loc, **kwargs):
This feels like what I should be wanting except:
- why does it need explicit parameters? why can't it pick up its lines
and labels automatically, like legend does?
- it places the legend over the top of the current chart, I want it to
the right, so it doesn't obscure the information on the chart...
> or you could directly use the Figure.legend method.
How does this differ from the normal legend command?
How do I get hold of a figure to call its legend method?
How does figure.legend interact with subplots?
I have a bout 6 subplots on the same figure(?) and they each need to
have a legend which is not obscuring the data plotted and isn't
obscuring any other figure...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Lorenzo I. <lor...@gm...> - 2008-03-18 09:39:37
|
Dear All, I think the solution to my problem must be a one-liner, but I have been unsuccessful. I am trying to use latex formulas (nothing dramatically complicated) inside a figure. I suppose everything is working correctly on my system. I tried running the example at: http://www.scipy.org/Cookbook/Matplotlib/UsingTex and it works fine. But now have a look at this: #! /usr/bin/env python import scipy as s import numpy as n import pylab as p x=s.linspace(0.,(2.*s.pi),100) y=s.sin(x) z=s.exp(-x) #Now I create my figure fig = p.figure() axes = fig.gca() axes.plot(x,y, "bo",label=(r"$sin(\tau)$")) axes.plot(x,z,'--r',label=(r"$\rm{decay}exp(\tau) $"),linewidth=2.) p.xlabel('This is $\tau$') p.ylabel('$N_\infty(\tau)$') axes.legend() p.title('My test functions') p.grid(True) p.savefig("simple_test.pdf") p.clf() The point of the example figure is to try mixing latex formulas and text. Obviously, the result is not satisfactory. If I use \sin for instance, then I get an error message as that is not recognized. I think the fix to this must be rather simple for someone knowledgeable, but so far my attempts to get some decent mixed latex/text output have been unsuccessful. Can anyone help me with this simple example code? Many thanks Lorenzo |
|
From: Chris W. <ch...@si...> - 2008-03-18 09:34:08
|
Eric Firing wrote:
>> Specifically, what I have is an array like so:
>>
>> ['','','',1.1,2.2]
>
> Try something like this:
>
> import numpy.ma as ma
> from pylab import *
>
> aa = [3.4, 2.5, '','','',1.1,2.2]
> def to_num(arg):
> if arg == '':
> return 9999.0
> return arg
>
> aanum = array([to_num(arg) for arg in aa])
> aamasked = ma.masked_where(aanum==9999.0, aanum)
> plot(aamasked)
> show()
What I ended up doing was getting my array to look like:
from numpy import nan
aa = [3.4,2.5,nan,nan,nan,1.1,2.2]
values = numpy.array(aa)
values = numpy.ma.masked_equal(values,nan)
I only wish that masked_equal didn't blow up when aa contains datetime
objects :-(
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Chris W. <ch...@si...> - 2008-03-18 09:22:59
|
Eric Firing wrote:
>> I can get the major ticks to show by doing grid(True), but how do I
>> get the same effect for minor ticks?
>
> Try
>
> grid(True, which='minor')
Thanks, that worked (well, it did what it was supposed to...) so it'd be
nice if it was in the online docs as well as the docstring of the method;-)
However, this isn't quite what I want... I only want the grid for the
y-axis (ie: horizontal lines in the grid, but no vertical), how would I
do that?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Ryan D. <rya...@UD...> - 2008-03-18 01:54:24
|
Hi,
I tried to run the dynamic_collections.py example in the source
directory (SVN revision 5002) but got the following error:
Traceback (most recent call last):
File "dynamic_collection.py", line 23, in <module>
transOffset = ax.transData,
TypeError: __init__() got multiple values for keyword argument 'numsides'
I removed the numsides=5 keyword argument (line 16) from
dynamic_collections.py, and while it lets the example run without error,
the "dynamic" aspect doesn't work. That is, the initial plot with a
single point appears but pressing 'a' or 'd' does nothing (when it
should add or delete a point).
Any ideas on how to get this working?
thanks,
-Ryan
|
|
From: Eric F. <ef...@ha...> - 2008-03-18 00:32:38
|
You can choose the kind of interpolation that gets used:
* interpolation is one of:
'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36',
'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc',
'lanczos', 'blackman'
if interpolation is None, default to rc
image.interpolation. See also th the filternorm and
filterrad parameters
If you don't want interpolation at all, just solid filled squares, then
use interpolation='nearest'.
Eric
Christian Lerrahn wrote:
> Hi,
> I'm plotting some 2D grid data using imshow(). However, one of my test
> problems involves a Gaussian peak in the center of my grid. For some
> strange reason this Gaussian looks like 5 distinct peaks. It looks like
> the values are only set at the centers of my grid cells and then the
> colour gradients are interpolate from this central point and a
> background.
> You can have a look at the original plot and a magnified one at
>
> http://www.maths.monash.edu.au/~clerrahn/gaussian1.png
> http://www.maths.monash.edu.au/~clerrahn/gaussian2.png
>
> Cheers,
> Christian
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Robert K. <rob...@gm...> - 2008-03-18 00:31:20
|
Christian Lerrahn wrote: > Hi, > I'm plotting some 2D grid data using imshow(). However, one of my test > problems involves a Gaussian peak in the center of my grid. For some > strange reason this Gaussian looks like 5 distinct peaks. It looks like > the values are only set at the centers of my grid cells and then the > colour gradients are interpolate from this central point and a > background. > You can have a look at the original plot and a magnified one at > > http://www.maths.monash.edu.au/~clerrahn/gaussian1.png > http://www.maths.monash.edu.au/~clerrahn/gaussian2.png The problem is that the colors are being set at the points by looking them up in the colormap, and the intermediate colors are being interpolated between those looked-up colors (this may be the point you are trying to make, but I couldn't be sure). The peak color is correct; it only looks like it is lower than the four surrounding points because that colormap is not a very good one for this kind of data. Use a single-hue colormap, instead. The alternative is to interpolate the *values* at the intermediate pixels first, and then look up the colors for each pixel in the colormap. This would give more reasonable results even with misapplied colormaps. However, it will probably be less efficient to implement. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
|
From: Christian L. <li...@pe...> - 2008-03-18 00:13:08
|
Hi, I'm plotting some 2D grid data using imshow(). However, one of my test problems involves a Gaussian peak in the center of my grid. For some strange reason this Gaussian looks like 5 distinct peaks. It looks like the values are only set at the centers of my grid cells and then the colour gradients are interpolate from this central point and a background. You can have a look at the original plot and a magnified one at http://www.maths.monash.edu.au/~clerrahn/gaussian1.png http://www.maths.monash.edu.au/~clerrahn/gaussian2.png Cheers, Christian |
|
From: Rich F. <wha...@fs...> - 2008-03-17 22:22:28
|
Eric Firing wrote: > > The transforms can be modified at drawing time, so you need to get the > pixel locations after the plot has been drawn. Are you doing this? Eric, Thank you! I put the transforms after savefig() and it works like a champ now. Rich |
|
From: Eric F. <ef...@ha...> - 2008-03-17 21:22:33
|
It sounds like what you want it the pyplot figlegend command:
def figlegend(handles, labels, loc, **kwargs):
"""
Place a legend in the figure. Labels are a sequence of
strings, handles is a sequence of line or patch instances, and
loc can be a string r an integer specifying the legend
location
USAGE:
legend( (line1, line2, line3),
('label1', 'label2', 'label3'),
'upper right')
See help(legend) for information about the location codes
A matplotlib.legend.Legend instance is returned
"""
or you could directly use the Figure.legend method. The relevant part
of the docstring regarding placement in the figure is here:
The LOC location codes are
'best' : 0, (currently not supported for figure legends)
'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4,
'right' : 5,
'center left' : 6,
'center right' : 7,
'lower center' : 8,
'upper center' : 9,
'center' : 10,
loc can also be an (x,y) tuple in figure coords, which
specifies the lower left of the legend box. figure coords are
(0,0) is the left, bottom of the figure and 1,1 is the right,
top.
Eric
Chris Withers wrote:
> Matthias Michler wrote:
>> sorry I don't understand what you are exactly looking for. Maybe you could
>> explain it once more.
>
> Well, what you provided was pretty close, it's just that the legend was
> partly placed outside the figure...
>
>> In general I think all one can do is to play around with the parameters
>> in 'subplots_adjust' and the location in 'legend' to get the best result.
>> I'm not an expert but I think there's no default behaviour covering all needs
>> (outside the axes and best located), because for example the legend width is
>> influenced by the length of the labels.
>
> Right, this is the problem. The location your example provided is
> perfect, except that I may have no control over the length of the legend
> text, and so need to find a way to make sure the figure size is such
> that the legend doesn't end up being half off the figure...
>
> Anyone know how to do that?
>
> (and thanks to Matthias for all his help! :-) )
>
> cheers,
>
> Chris
>
|
|
From: Eric F. <ef...@ha...> - 2008-03-17 21:17:53
|
Rich,
The transforms can be modified at drawing time, so you need to get the
pixel locations after the plot has been drawn. Are you doing this?
Eric
Rich Fought wrote:
> Rich Fought wrote:
>> I'm plotting some grid data using pcolor, and trying to get canvas pixel
>> locations of data points using the
>>
>> ax.transData.xy_tup()
>>
>> method. I am saving these figures to PNG files using the default Agg
>> backend. When I open these images up in Gimp and check the pixel
>> locations, the X pixel locations are accurate, but the Y pixel locations
>> I am getting from matplotlib seem to be exaggerated the further away
>> from Y=0 I go. Am I using this method incorrectly? Could this be an
>> artifact of the rendering to PNG?
>>
>
> I determined what is causing the exaggerated y-pixel values. I was using
>
> axes().set_aspect('equal')
>
> on the figure and this apparently does not get taken into account when using
>
> ax.transData.xy_tup()
>
> I tried setting the aspect in the original fig.add_subplot, but got the
> same incorrect results.
>
> ax = fig.add_subplot(111, aspect='equal')
>
> Leaving the aspect alone gives correct pixel results.
>
> Is this a bug, or expected behavior?
>
> Rich
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Michael R. <mic...@ya...> - 2008-03-17 19:21:08
|
Hi all,
I apologize in advance if these issues have already been addressed. I did a
search of the mailing lists and did not find them discussed but I may have
missed them.
I had some trouble getting the historical quotes data from yahoo to work,
apparently because yahoo changed the format of the dates in their output files
- once I changed the date format string in finance.py it worked fine.
Also the color of the candlestick shadow line that shows the day's range was
hard-coded to be black. Because it didn't show up on my charts with black
backgrounds, I changed the code to make the shadow match the color of the
candle's real body.
I am attaching a diff of my finance.py, which on my Debian Etch system came in
a package that says its version is 0.87.7-0.3.
Please keep in mind that I do not intend the code I am attaching to be a
comprehensive fix, just a simple kludge. I am totally new both to matplotlib
and to python and I have only done as much kludge-ing as was necessary to get
the code to do what I needed it to do right now. I will leave doing things the
right way, to people already more familiar with the language and the code.
Peace,
Michael
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Eric F. <ef...@ha...> - 2008-03-17 18:29:29
|
Chris Withers wrote: > Hi All, > > How do I go about showing minor ticks as lines across the whole plot, as > opposed to just little ticks at the side? > > I can get the major ticks to show by doing grid(True), but how do I get > the same effect for minor ticks? Try grid(True, which='minor') Eric > > cheers, > > Chris > |
|
From: Eric F. <ef...@ha...> - 2008-03-17 18:14:18
|
Chris Withers wrote:
> Eric Firing wrote:
>> Chris,
>>
>> Use masked arrays. See masked_demo.py in the mpl examples subdirectory.
>
> Hi Eric,
>
> I took a look at that, but it uses:
>
> import matplotlib.numerix.npyma as ma
>
> ...and matplotlib.numerix isn't listed in the API reference. Where are
> the docs for this?
numerix is obsolete, and numerix.npyma was a temporary method to provide
access to either of two masked array implementations. It is probably
time for me to remove it from the examples. Substitute
import numpy.ma as ma
The ma module is documented as part of numpy.
>
> Specifically, what I have is an array like so:
>
> ['','','',1.1,2.2]
Try something like this:
import numpy.ma as ma
from pylab import *
aa = [3.4, 2.5, '','','',1.1,2.2]
def to_num(arg):
if arg == '':
return 9999.0
return arg
aanum = array([to_num(arg) for arg in aa])
aamasked = ma.masked_where(aanum==9999.0, aanum)
plot(aamasked)
show()
Eric
>
> I want to mask the strings out so I don't get ValueErrors raised when I
> call plot functions with that array.
>
> How should I do that?
>
> cheers,
>
> Chris
>
|
|
From: Chris W. <ch...@si...> - 2008-03-17 17:23:49
|
Matthias Michler wrote:
> sorry I don't understand what you are exactly looking for. Maybe you could
> explain it once more.
Well, what you provided was pretty close, it's just that the legend was
partly placed outside the figure...
> In general I think all one can do is to play around with the parameters
> in 'subplots_adjust' and the location in 'legend' to get the best result.
> I'm not an expert but I think there's no default behaviour covering all needs
> (outside the axes and best located), because for example the legend width is
> influenced by the length of the labels.
Right, this is the problem. The location your example provided is
perfect, except that I may have no control over the length of the legend
text, and so need to find a way to make sure the figure size is such
that the legend doesn't end up being half off the figure...
Anyone know how to do that?
(and thanks to Matthias for all his help! :-) )
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Chris W. <ch...@si...> - 2008-03-17 17:20:17
|
Hi All,
How do I go about showing minor ticks as lines across the whole plot, as
opposed to just little ticks at the side?
I can get the major ticks to show by doing grid(True), but how do I get
the same effect for minor ticks?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Chris W. <ch...@si...> - 2008-03-17 17:18:52
|
Matthias Michler wrote:
> you can try xlabel of an empty string:
>
> xlabel(' ')
Thanks, and yes, a truly empty string xlabel(''), works :-)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
|
|
From: Mark B. <ma...@gm...> - 2008-03-17 16:50:54
|
Hello Bernhard and others - I tried all the options, but nothing works. Whenever I type a greek symbol in mathtext and save the figure as eps, the greek symbols don't show up. Confirmed on several windows machines. Python 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does anybody else have this problem? It is starting to look like a bug. Thanks, Mark On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt <Ber...@de...> wrote: > what are the values of pdf and ps fonttype in your rc file? > > try using this: > ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 > (TrueType) > pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 > (TrueType) > > this includes the missing symbols into the ps/pdf file, if you choose type > 42 the complete font will be inserted in the resulting file. > > in addition check the mathtext.fontset setting, try using stix or cm: > mathtext.fontset: cm > > best wishes, bernhard > > > > On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker <ma...@gm...> wrote: > > > Hello - > > > > I am trying this again. I recently upgraded to 0.91.2, and export of > > mathtext to eps files seems broken (at least with the default matplotlibrc > > file). > > > > Figure looks great on the screen (interactive mode). Exporting to png > > still works fine. > > > > But writing to eps file, the greek symbols (I tried \theta and > > \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very > > ugly (different font than used to). Any suggestions? Anybody seenig the same > > behavior? > > > > Thanks, Mark > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > |
|
From: Matthias M. <Mat...@gm...> - 2008-03-17 16:47:17
|
Hi Chris, sorry I don't understand what you are exactly looking for. Maybe you could explain it once more. In general I think all one can do is to play around with the parameters in 'subplots_adjust' and the location in 'legend' to get the best result. I'm not an expert but I think there's no default behaviour covering all needs (outside the axes and best located), because for example the legend width is influenced by the length of the labels. much effort and best regards Matthias On Monday 17 March 2008 17:13, Chris Withers wrote: > Hi Matthias, > > Matthias Michler wrote: > > I'm not sure if there was an example in matplotlib, but the following > > works for me: > > --------------------------------------------------------------------- > > from pylab import * > > figure() > > subplot(111) > > subplots_adjust(right=0.7) > > plot(arange(10), label='linear') > > plot(arange(10)**2, label='quadratic') > > legend(loc=(1.1,0.5)) > > show() > > ------------------------------------------------------------------------ > > Thanks for this. This is exactly what I was after except that the legend > now appears about 25% off the right hand of the screen or whatever I > save the figure to. > > How can I have the legend as placed above but with the whole of it showing? > > cheers, > > Chris |