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
(19) |
2
(30) |
3
(14) |
4
(1) |
|
5
(16) |
6
(7) |
7
(12) |
8
(14) |
9
(35) |
10
(16) |
11
(31) |
|
12
(6) |
13
(14) |
14
(13) |
15
(20) |
16
(15) |
17
(27) |
18
(5) |
|
19
(10) |
20
(22) |
21
(20) |
22
(30) |
23
(25) |
24
(11) |
25
(2) |
|
26
(2) |
27
(23) |
28
(20) |
29
(26) |
30
(25) |
31
(7) |
|
|
From: Jack S. <jac...@gm...> - 2009-07-15 23:44:05
|
Thanks JJ, I'll give that a shot. The problem with making them invisible is they take up a lot of unnecessary overhead in my vector graphics program that already runs ridicuslow :) On Wed, Jul 15, 2009 at 11:58 AM, Jae-Joon Lee <lee...@gm...> wrote: > > http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=errorbar#matplotlib.pyplot.errorbar > > As described in the doc, the errorbar command creates lines and line > collections, where the errorbars are created as line collections. > Axes.collections contains the list of collection artist that belong to > the axes hence this is the place. > > However, I don't think manipulating Axes.collections (and the return > value of get_lines() ) in this way is a good idea. All the artist > added to an axes has "remove" method. When called, the artist remove > itself from the axes it belongs. > > I'm not sure what your intention is, but if you want to temporarily > remove some artists from the axes, it would be easier to make them > simply invisible. Otherwise, I recommend you to use the remove method. > > Regards, > > -JJ > > > > On Tue, Jul 14, 2009 at 6:13 PM, Jack Sankey<jac...@gm...> wrote: > > Hello, > > I'm writing a script that removes data from plots by looping over > > axes.get_lines(), removing data, then using axes.set_lines(). It works > quite > > well, but when it's a plot with error bars, the vertical part of the > error > > bar is not disappearing. > > I'm assuming the vertical part is a vline or something and so should not > be > > with the other lines. Where does this data get stuck? :) > > Thanks! > > Jack > > > ------------------------------------------------------------------------------ > > Enter the BlackBerry Developer Challenge > > This is your chance to win up to $100,000 in prizes! For a limited time, > > vendors submitting new applications to BlackBerry App World(TM) will have > > the opportunity to enter the BlackBerry Developer Challenge. See full > prize > > details at: http://p.sf.net/sfu/Challenge > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > |
|
From: Chloe L. <ch...@na...> - 2009-07-15 23:00:38
|
Experimenting in ipython (run ipython --pylab) is excellent for this; not only do you see results promptly, but help(pylab) lists, for instance, the functions xlim and ylim, with which you can get and set any of the four axis limits. &C On Jul 15, 2009, at 3:54 PM, Dr. Phillip M. Feldman wrote: > > One can set axis limits via a command like the following: > > pyplot.axis([0 10 0 1]) > > But, there are situations where I'd like to set limits only for the > y-axis, > leaving the x-axis alone, or vice versa, or set a lower limit for > the y-axis > but leave the upper limit alone. Is there a clean way of doing > this? (I > have not been able to find anything relevant in the Matplotlib Users > Guide). > -- > View this message in context: http://www.nabble.com/setting-axis-limits-tp24507383p24507383.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited > time, > vendors submitting new applications to BlackBerry App World(TM) will > have > the opportunity to enter the BlackBerry Developer Challenge. See > full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users Chloe Lewis Graduate student, Amundson Lab Division of Ecosystem Sciences, ESPM University of California, Berkeley 137 Mulford Hall - #3114 Berkeley, CA 94720-3114 ch...@na... |
|
From: Pierre GM <pgm...@gm...> - 2009-07-15 22:58:42
|
On Jul 15, 2009, at 6:54 PM, Dr. Phillip M. Feldman wrote: > leaving the x-axis alone, or vice versa, or set a lower limit for > the y-axis > but leave the upper limit alone. Is there a clean way of doing > this? (I > have not been able to find anything relevant in the Matplotlib Users > Guide). Please check set_xlim and set_ylim. |
|
From: Dr. P. M. F. <pfe...@ve...> - 2009-07-15 22:54:25
|
One can set axis limits via a command like the following: pyplot.axis([0 10 0 1]) But, there are situations where I'd like to set limits only for the y-axis, leaving the x-axis alone, or vice versa, or set a lower limit for the y-axis but leave the upper limit alone. Is there a clean way of doing this? (I have not been able to find anything relevant in the Matplotlib Users Guide). -- View this message in context: http://www.nabble.com/setting-axis-limits-tp24507383p24507383.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Damon M. <dam...@gm...> - 2009-07-15 22:08:13
|
Hi Phillip, Don't you need to call pyplot.show() at the end of the script? Regards, --Damon On 15 Jul 2009, at 22:58, Dr. Phillip M. Feldman wrote: > > I'm a newbie to matplotlib. When I try to generate a simple plot, > nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) > -- > View this message in context: http://www.nabble.com/invisible-plot-tp24506682p24506682.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited > time, > vendors submitting new applications to BlackBerry App World(TM) will > have > the opportunity to enter the BlackBerry Developer Challenge. See > full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Alan G I. <ala...@gm...> - 2009-07-15 22:08:07
|
On 7/15/2009 5:58 PM Dr. Phillip M. Feldman apparently wrote:
> I'm a newbie to matplotlib. When I try to generate a simple plot, nothing
> happens. Any advice will be appreciated. Here's my code:
> from numpy import *
> from matplotlib import *
> x= arange(0,10.,0.1)
> y= x**1.5 - 0.25*x**2
> pyplot.figure(figsize=(9, 6), dpi=120)
> pyplot.plot(x, y)
Hmm, I don't think you copied that quite right.
Anyway::
import numpy as np
from matplotlib import pyplot as plt
x= np.arange(0,10.,0.1)
y= x**1.5 - 0.25*x**2
fig = plt.figure(figsize=(9, 6), dpi=120)
myplot = plt.plot(x, y)
plt.show()
Alan Isaac
|
|
From: Eric F. <ef...@ha...> - 2009-07-15 22:05:20
|
Dr. Phillip M. Feldman wrote: > I'm a newbie to matplotlib. When I try to generate a simple plot, nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) pyplot.show() Or run inside "ipython -pylab". Eric |
|
From: Ryan M. <rm...@gm...> - 2009-07-15 22:04:20
|
On Wed, Jul 15, 2009 at 4:58 PM, Dr. Phillip M. Feldman <
pfe...@ve...> wrote:
>
> I'm a newbie to matplotlib. When I try to generate a simple plot, nothing
> happens. Any advice will be appreciated. Here's my code:
>
> from numpy import *
> from matplotlib import *
>
> x= arange(0,10.,0.1)
> y= x**1.5 - 0.25*x**2
>
> pyplot.figure(figsize=(9, 6), dpi=120)
> pyplot.plot(x, y)
Add this to the end of the script (after all the plotting):
pyplot.show()
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: Robert K. <rob...@gm...> - 2009-07-15 22:03:39
|
On 2009-07-15 16:58, Dr. Phillip M. Feldman wrote: > I'm a newbie to matplotlib. When I try to generate a simple plot, nothing > happens. Any advice will be appreciated. Here's my code: > > from numpy import * > from matplotlib import * > > x= arange(0,10.,0.1) > y= x**1.5 - 0.25*x**2 > > pyplot.figure(figsize=(9, 6), dpi=120) > pyplot.plot(x, y) pyplot.show() -- 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: Dr. P. M. F. <pfe...@ve...> - 2009-07-15 21:58:15
|
I'm a newbie to matplotlib. When I try to generate a simple plot, nothing happens. Any advice will be appreciated. Here's my code: from numpy import * from matplotlib import * x= arange(0,10.,0.1) y= x**1.5 - 0.25*x**2 pyplot.figure(figsize=(9, 6), dpi=120) pyplot.plot(x, y) -- View this message in context: http://www.nabble.com/invisible-plot-tp24506682p24506682.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Louise L. <lou...@gm...> - 2009-07-15 19:23:25
|
Hi. I am trying to output multiple 2D graphs (subplots) in one figure
(using pylab) for each time-step that the python code runs - basically an
interactive graphs. We use the 'ion()' and 'imshow()' functions for this.
I have many graphs to chose from, but say if I chose 4 graphs to output, all
4 will output for the 1st time step, but for every additional time step only
the last graph will update. The first 3 will remain the same, as they were
in the 1st time step. Has anyone has this problem? Any suggestions?
A portion of the O-O code is below. This function is called in another
file. I tried to add notes where I thought they were helpful.
def multi_display(self, n=4):
''' displaying multiple graphs '''
ion()
m = self.displayed_multi # four input graph names (provided when
function is called)
nsub = n # no. of subgraphs/time step
for i in range(nsub): # for each subplot
p = i +1
exec ("self.subplot" + str(p) + " = subplot(2, 2, p)") # OR
subplot(2,2,p)
self.displayed = m[i]
self.display_stand() # this calls the function below with
'self.displayed' in it.
def display_stand(self): # displays individual graphs
if self.displayed == 'ht': # this is only one of the four graphs (or
subplots)
vm = 0.0
vx = 40.0
t = 'Height (m)'
imshow(self.old_ht, vmin = vm, vmax = vx,
interpolation = 'nearest')
title(t)
Thanks,
Louise
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-07-15 16:51:50
|
On Mon, Jul 13, 2009 at 4:56 PM, Uri Laserson<las...@mi...> wrote:
> Hi everyone,
>
> I am trying to create some brand new types of plots for a unique data set
> that I have. My question basically boils down to getting some advice on
> what is the proper way to set up a function that will act like one of the
> matplotlib pyplot functions (e.g., have all the same behavior regarding
> interactive stuff, resizing, etc.).
Most of the pyplot functions are wrapper around the method in the Axes class.
For example, pyplot.plot is basically
ax = gca()
ax.plot()
draw_if_interactive()
And the basic role of the plotting method in the Axes class is to
create appropriate
matplotlib artists and add them to the axes. If your plot can be
created with matplotlib's currently existing artists, you can simply
reuse them. Otherwise, you need to create your own artist, but this
requires some understandings of internals.
For example,
def ax_my_plot(ax, *kl, **ka):
# create artists and add them to ax
def my_plot(*kl, **ka):
ax = gca()
ax_my_plot(ax, *kl, **ka)
draw_if_interactive()
"my_plot" will behave similar to other pyplot command.
>
> I have been looking through some of the code for the major functions like
> plot, but have been having trouble parsing it. I think that some of this is
> obfuscated in the complexity of the functions.
>
> At some level, I would also like to be able to draw on the canvas in a very
> explicit way, like in Processing (http://processing.org/); what is the best
> way to approach this?
You can draw something in the canvas coordinate. But what you can do
is limited by the matplotlib's backend api, which is more like a
vector drawing tool. So things like a pixel manipulation is not
suitable.
Regards,
-JJ
>
> Another thing that could be really nice is to have some boilerplate
> framework that someone could start with to quickly write functions that
> integrate well into the rest of matplotlib.
>
> (And sorry if I am sounding critical of the package. I actually love it,
> and have been quite the MPL evangelist in my little section of Boston.)
>
> Any suggestions are welcome.
>
> Uri
>
> --
> Uri Laserson
> PhD Candidate, Biomedical Engineering
> Harvard Medical School (Genetics)
> Massachusetts Institute of Technology (Mathematics)
> phone +1 917 742 8019
> las...@mi...
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-07-15 16:09:15
|
Check the gallery where a few example shows you how to draw arrows.
My recommendation is to use "annotate" with empty string.
e.g.,
annotate("", (1,2), xytext=(5,2), arrowprops=dict(fc="b"))
http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=annotate#matplotlib.pyplot.annotate
However, a line with an arrow in the middle is not supported. But
something like below may be close enough?
annotate("", (3,5), xytext=(5,5),
arrowprops=dict(arrowstyle="->", fc="b", shrinkB=0))
annotate("", (1,5), xytext=(3,5),
arrowprops=dict(arrowstyle="-", fc="b", shrinkA=0))
-JJ
On Tue, Jul 14, 2009 at 2:13 PM, Afi Welbeck<wel...@ya...> wrote:
> Hi all,
>
> I'm a newbie, I'm trying to plot a line with an arrow
> (arrow in the middle and another with an arrow at
> the end) with the following points: [1, 2] and [5, 2]
> Could anyone please help me with the code?
> Thanks.
> Harriet A. Welbeck
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-07-15 15:58:38
|
http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=errorbar#matplotlib.pyplot.errorbar As described in the doc, the errorbar command creates lines and line collections, where the errorbars are created as line collections. Axes.collections contains the list of collection artist that belong to the axes hence this is the place. However, I don't think manipulating Axes.collections (and the return value of get_lines() ) in this way is a good idea. All the artist added to an axes has "remove" method. When called, the artist remove itself from the axes it belongs. I'm not sure what your intention is, but if you want to temporarily remove some artists from the axes, it would be easier to make them simply invisible. Otherwise, I recommend you to use the remove method. Regards, -JJ On Tue, Jul 14, 2009 at 6:13 PM, Jack Sankey<jac...@gm...> wrote: > Hello, > I'm writing a script that removes data from plots by looping over > axes.get_lines(), removing data, then using axes.set_lines(). It works quite > well, but when it's a plot with error bars, the vertical part of the error > bar is not disappearing. > I'm assuming the vertical part is a vline or something and so should not be > with the other lines. Where does this data get stuck? :) > Thanks! > Jack > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Jan S. <cur...@gm...> - 2009-07-15 15:08:30
|
Hi matplotters,
I am trying to create an image and save it to pdf.
Unfortunately, the result is much different if I save it to pdf, eps
or png.
I am on Mac OS X 10.4, using qt4 4.5.0 and the qt4agg backend (but
the problems also occur with -dmacosx).
The plot I am trying to make is an overlay of hists + datapoints with
errorbars.
The png roughly looks like I would expect (although I can't figure
out how to plot a straight black horizontal line at y=0. pylab.plot
doesn't seem to do what I want)
The eps doesn't get filled with the correct colors, and the pdf and
the svg don't work at all.
The error message for saving as svg is inlined below the message.
The rest of the files should be accessible at https://
jstrube.web.cern.ch/jstrube/matplotlib_testcase/
You need the python bindings to CERN's ROOT libraries if you want to
reproduce the plot.
Any help is greatly appreciated.
Cheers,
Jan
File "analyzeLambdaPbarGammaShape.py", line 128, in <module>
pl.savefig('lambdaPbarGamma_all.svg')
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/pyplot.py", line 354, in savefig
return fig.savefig(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/figure.py", line 1002, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_qt4agg.py", line
144, in print_figure
FigureCanvasAgg.print_figure(self, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backend_bases.py", line 1476, in
print_figure
**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backend_bases.py", line 1355, in
print_svg
return svg.print_svg(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_svg.py", line
615, in print_svg
return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_svg.py", line
650, in _print_svg
self.figure.draw(renderer)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/figure.py", line 774, in draw
for a in self.axes: a.draw(renderer)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/axes.py", line 1826, in draw
a.draw(renderer)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/patches.py", line 326, in draw
renderer.draw_path(gc, tpath, affine, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_svg.py", line
233, in draw_path
self._draw_svg_element('path', 'd="%s"' % path_data, gc, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_svg.py", line 69,
in _draw_svg_element
style = self._get_style(gc, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_svg.py", line
121, in _get_style
fill = "url(#%s)" % self._get_hatch(gc, rgbFace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/backends/backend_svg.py", line
107, in _get_hatch
(HATCH_SIZE+1, HATCH_SIZE+1, rgb2hex(rgbFace)))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/colors.py", line 221, in rgb2hex
return '#%02x%02x%02x' % tuple([round(val*255) for val in rgb])
TypeError: 'NoneType' object is not iterable
|
|
From: John [H2O] <was...@gm...> - 2009-07-15 13:48:52
|
I also recently posted an example that may do something similar to what you are after, you can have a look here: http://www.nabble.com/contribute-to-gallery--Or%2C-just-advice-on-changing-colors-automagically....-td24419101.html#a24427781 per freem-2 wrote: > > Hi all, > > i would like to set the colors of the lines i plot (using the plot > function) > to go from red to blue, in evenly spaced interval. that is, imagine a > color > map from red to green, where i plot n-many lines, each receiving a color > from this color map, starting at the red end and going to green. > > the docs say how to set the color cycle of lines set by plot, using: > > matplotlib.axes.set_default_color_cycle(['r', 'y', 'g', 'b']) > > but this only allows me to use named colors, and here i am looking to use > shades from red to green. > my question is: first, how can i generate N evenly spaced colors from the > red spectrum to the green spectrum? and two, how can i make it so plot > uses > these colors for its line plots? > > thanks very much. > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full > prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/question-about-setting-colors-of-lines-using-colormap-tp24479842p24498248.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2009-07-15 10:45:59
|
On Tue, Jul 14, 2009 at 12:48 PM, Northenlight<Jia...@gm...> wrote: > > Hi, > > Is there a way to interactive with the plot? For example, draw a vertical > marker on the plot, let user move the marker and shows x, y values of the > point where the curve intersect with the marker? See these examples and tutorial: http://matplotlib.sourceforge.net/users/event_handling.html http://matplotlib.sourceforge.net/examples/event_handling/index.html In particular, the http://matplotlib.sourceforge.net/examples/event_handling/path_editor.html example shows how to click and drag points JDH |
|
From: Jeff W. <js...@fa...> - 2009-07-15 05:01:53
|
per freem wrote:
> hi all,
>
> i'm getting very strange behavior from the matplotlib 'plot' function
> when attempting to plot multiple lines. i have a series of x, y data
> points that are being generated in a loop and i want to simply plot
> each of them on the same plot. my code is:
>
> import matplotlib
> matplotlib.use('PDF')
> import matplotlib.pyplot as plt
> from matplotlib import rc
> rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
> plt.rcParams['ps.useafm'] = True
> rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
>
> my_fig = plt.figure(figsize=(6,5), dpi=100)
> num_lines = 3
>
> for n in range(0, num_lines):
> print "Printing line %d" %(n+1)
> x = range(0, 100)
> y = (ones(100)*(n+1))
> plt.plot(x, y)
>
> plt.savefig('plot_example.pdf')
>
> when I do this, it only plots the last line (a horizontal line at y =
> 3). how can i get to actually plot all three lines?
>
> more strangely, it shows *stochastic* behavior: sometimes when i run
> the code, it generates a green line at y = 3, and other times a blue
> line. from plot to plot, the upper bound of the y axis changes,
> sometimes being 3.15, sometimes 3.2. i'm not sure why it is doing that.
>
> how can i get it to simply add whatever i plot in the body of the
> 'for' loop to the same graph? i tried adding plt.plot() after my call
> to plt.plot but that did not fix it.
>
> thank you.
Per: The plots are there, you just can't see them because the y-axis
has been auto-scaled so that the first and last lines lie on the top and
bottom of the plot window. Just add plt.ylim(0,4) after the loop and
you will see all three lines.
-Jeff
|
|
From: per f. <per...@gm...> - 2009-07-15 02:48:31
|
hi all,
i'm getting very strange behavior from the matplotlib 'plot' function when
attempting to plot multiple lines. i have a series of x, y data points that
are being generated in a loop and i want to simply plot each of them on the
same plot. my code is:
import matplotlib
matplotlib.use('PDF')
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
plt.rcParams['ps.useafm'] = True
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
my_fig = plt.figure(figsize=(6,5), dpi=100)
num_lines = 3
for n in range(0, num_lines):
print "Printing line %d" %(n+1)
x = range(0, 100)
y = (ones(100)*(n+1))
plt.plot(x, y)
plt.savefig('plot_example.pdf')
when I do this, it only plots the last line (a horizontal line at y = 3).
how can i get to actually plot all three lines?
more strangely, it shows *stochastic* behavior: sometimes when i run the
code, it generates a green line at y = 3, and other times a blue line. from
plot to plot, the upper bound of the y axis changes, sometimes being 3.15,
sometimes 3.2. i'm not sure why it is doing that.
how can i get it to simply add whatever i plot in the body of the 'for' loop
to the same graph? i tried adding plt.plot() after my call to plt.plot but
that did not fix it.
thank you.
|
|
From: Stephen G. <ste...@op...> - 2009-07-15 01:06:30
|
Hi Jon, To clarify, I think you need to read Christoph Gohlke original message (7/7/2009) to me to put my response into context: > Hi Steve, > > matplotlib-0.98.5.3.win32-py2.6.exe was compiled without support for GTK. > > If you don't mind trying, I have a build of the matplotlib trunk > available on my homepage that has GTK support enabled: > > http://www.lfd.uci.edu/~gohlke/#pythonlibs > > It should work with the PyGTK 2.12 Windows binaries from > http://www.pygtk.org/downloads.html. > > SVG support seems broken: the window.set_icon_from_file() function in > backend_gtk.py will raise an exception, not recognizing SVG files. The > PNG icon works. > > Christoph > From that web page I downloaded http://www.lfd.uci.edu/~gohlke/download/matplotlib-0.98.6svn.win32-py2.6.exe NOTICE the version number 0.98.6svn Then in my code I have the following lines: from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar For your benefit I changed to the same backend as yours ( GTKAgg backend ) and run again My application ran successfully with both the GTKAgg and GTKCario backends. Why don't you take the svn version for a spin, you might also have success. Hope this has been of some help Steve Jon Roadley-Battin wrote: > Question is however, are you using the GTK backend? > ie > > from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as > FigureCanvas > from matplotlib.backends.backend_gtkagg import > NavigationToolbar2GTKAgg as NavigationToolbar > > backend_gtkagg then imports matplotlib.backends._gtkagg > For matplotlib-0.98.5.2.win32-py2.5.exe > C:\Python25\Lib\site-packages\matplotlib\backends\_gtkagg.pyd exists > > For matplotlib-0.98.5.3.win32-py2.6.exe > C:\Python26\Lib\site-packages\matplotlib\backends\_gtkagg.pyd doesn't > > ie gtk backend doesn't seem to be compiled. > matplotlib is the only thing holding me back in moving to python26 (on > windows). Hopefully the svn build is updated soon or a new release is > due soon (I can wait ) > > > >Hi Christoph, > > > >Sorry for my delay to get back to you. > > > >The svn version seems to work fine with GTK support, at least my > >application had no problems running > > > >The versions I tested with are as follows: > > python version: 2.6.0 final 0 > > numpy version: 1.3.0 > > > matplotlib version: 0.98.6svn > > gtk+ version: 2.16.2 > > pyGTK version: 2.12.1 > > > >Thank you > >you have been a big help > > >Steve > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |