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) |
|
|
|
|
|
|
|
From: Dave G. <dav...@sc...> - 2011-07-14 23:42:37
|
The new Figure Options button in the PyQt plot toolbar is a really nice
feature that allows the user to change the line style for curves in the
plot. Unfortunately, the legend does not get updated, so the legend becomes
out of sync with the plot - when a user changes a line from black to red,
the legend will still show the line as black, for instance. Forcing the
legend to redraw itself via a draw() operation does not solve the problem -
it redraws, but still with the old color.
The issue seems to be that there doesn't appear to be a way to have a legend
update what its artists should look like based on their latest appearances.
I've developed a fix for this that seems to work, but wanted to see if
anyone had something better, or if people think I should submit this as a
potential fix. I'm not thrilled with it (it will fail if there are multiple
legends on the figure, for instance), but it does work for simple plots and
figures with multiple subplots.
The fix is in the apply_callback function inside the the
matplotlib.backends.qt4_editor.figureoptions.figure_edit function. I've
included the whole function below, with the fix contained within the
designated comments.
Comments? Is there an easier, better way to do this?
Dave
def apply_callback(data):
"""This function will be called to apply changes"""
if has_curve:
general, curves = data
else:
general, = data
# Set / General
title, xmin, xmax, xlabel, xscale, ymin, ymax, ylabel, yscale =
general
axes.set_xscale(xscale)
axes.set_yscale(yscale)
axes.set_title(title)
axes.set_xlim(xmin, xmax)
axes.set_xlabel(xlabel)
axes.set_ylim(ymin, ymax)
axes.set_ylabel(ylabel)
if has_curve:
# Set / Curves
for index, curve in enumerate(curves):
line = linedict[curvelabels[index]]
label, linestyle, linewidth, color, \
marker, markersize, markerfacecolor, markeredgecolor =
curve
line.set_label(label)
line.set_linestyle(linestyle)
line.set_linewidth(linewidth)
line.set_color(color)
if marker is not 'none':
line.set_marker(marker)
line.set_markersize(markersize)
line.set_markerfacecolor(markerfacecolor)
line.set_markeredgecolor(markeredgecolor)
### Fix begins here
# Recalculate the color and style of legend artists - note, this
# does not work for multiple legends on the same figure.
figure = axes.get_figure()
all_axes = figure.get_axes()
for legend in figure.legends:
# Need to gather all the legend items from all the subplots
all_handles = []
all_labels = []
for one_axes in all_axes:
handles, labels = one_axes.get_legend_handles_labels()
all_handles.extend(handles)
all_labels.extend(labels)
# Location and title are altered by the _init_legend_box
# function, so preserve the current values
loc = legend._loc
title = legend.get_title().get_text()
if title == 'None':
title = None
# This function recalculates colors and styles
legend._init_legend_box(all_handles, all_labels)
legend._loc = loc
legend.set_title(title)
### Fix ends here
# Redraw
figure = axes.get_figure()
figure.canvas.draw()
|
|
From: Christopher B. <c-...@as...> - 2011-07-14 21:00:13
|
Hi,
The following code displays a figure with both a red and a blue arrow
(generated by annotate). But the pdf that is saved only shows the red
one. It seems that the line ax1.set_xscale('log') is causing the
trouble, because if it is commented out, the blue arrow reappears in the
pdf. Any hints?
import numpy as np
from matplotlib import pyplot as pp
fig = pp.figure()
ax2 = fig.add_subplot(111)
ax1 = ax2.twinx()
ax1.set_xlim(xmin=100,xmax=10000)
ax1.set_ylim(ymin=-60, ymax=5)
ax1.set_xscale('log')
ax2.set_xlim(xmin=100,xmax=10000)
ax2.set_ylim(ymin=-5,ymax=35)
ax2.set_xscale('log')
ax1.annotate("", (10000,-30), (2000,-30),
arrowprops=dict(arrowstyle="-|>",fc="b", ec="b"))
ax2.annotate("", (100, 5), (2000, 5),
arrowprops=dict(arrowstyle="-|>",fc="r", ec="r"))
pp.savefig('test_arrow.pdf')
pp.show()
--
Christopher Brown, Ph.D.
Associate Research Professor
Department of Speech and Hearing Science
Arizona State University
http://pal.asu.edu
|
|
From: Justin M. <jn...@gm...> - 2011-07-14 20:49:07
|
On Thu, Jul 14, 2011 at 3:57 PM, T. Tofus von Blisstein <tuf...@go...> wrote: > Hi, > > how can I invert the colors of axes/background from black/white to white/black? > > thanks... I have been googling for a while... If you want to do it for all your plots, you can mess with all of the 'color*' settings in the .matplotlibrc file: http://matplotlib.sourceforge.net/users/customizing.html#the-matplotlibrc-file There are plenty of colors to change (font, line, axes, figure, patch, etc), so just grep through there. You'll probably want to change the color_cycle list. To do the same thing at runtime, play around with matplotlib.rc(), passing in the ones you'd change from above: http://matplotlib.sourceforge.net/api/matplotlib_configuration_api.html#matplotlib.rc Then you can reset it using rcdefaults(): http://matplotlib.sourceforge.net/api/matplotlib_configuration_api.html#matplotlib.rcdefaults If you don't like those approaches, you can specify the color for about everything using keyword arguments as you create the figure, axes, etc (using the object-oriented API), or call plot(), subplot(), etc (using the interactive pylab API). Try help(figure) and help(colors) for some examples. Hope that helps, Justin |
|
From: Yoshi R. <yo...@ro...> - 2011-07-14 20:27:11
|
hi, is it possible to restrict a contour plot to a country? if i grid my data to projection coordinates and then make a contour plot i can draw the country borders on top, but since the data plotted outside the country is a gridding artifact i would rather not plot it. to make it more clear what i mean: http://rokuko.net/basicmap.png any ideas? can one make a single country transparent? best regards, yoshi |
|
From: Pau <vim...@go...> - 2011-07-14 20:19:31
|
my problem was fixed with this var = float(sys.argv[1]) thanks! On 14 July 2011 16:24, Benjamin Root <ben...@ou...> wrote: > On Thursday, July 14, 2011, Pau <vim...@go...> wrote: >> Hi, >> >> I have a very naive question ... howmdo I pass an arg to a matplotlib >> script? I need to run MyScript 34 12 67 25 for the script to use those >> numbers to multiply quantities for producing a plot... I am using >> sysarg[1], 2, 3 but is seems not to work. >> >> thanks >> > > Could you attach your script so that we can see if there is a mistake > of some sort. > > Ben Root > |
|
From: T. T. v. B. <tuf...@go...> - 2011-07-14 19:58:05
|
Hi, how can I invert the colors of axes/background from black/white to white/black? thanks... I have been googling for a while... T. |
|
From: Justin M. <jn...@gm...> - 2011-07-14 15:06:37
|
On Wed, Jul 13, 2011 at 6:49 PM, Benjamin Root <ben...@ou...> wrote:
> On Wednesday, July 13, 2011, Justin McCann <jn...@gm...> wrote:
>> $ ipython -pylab
>> # ====
>> from matplotlib.collections import LineCollection
>> f = figure()
>> plot()
>> ax = gca()
>> vec = numpy.random.random((10,3))
>> segs = []
>> for i in range(0, len(vec)):
>> x1 = vec[i][0]
>> #x1 = 3000000
>> x2 = vec[i][1]
>> #x2 = 4000000
>> y1 = y2 = vec[i][2]
>> segs.extend( [[(x1,y1),(x2,y2)]] )
>>
>> line_segments = LineCollection(segs, linewidth=3, alpha=0.3, colors =
>> 'r', linestyle = 'solid')
>> ax.add_collection(line_segments)
>> ax.set_xlim(0,1)
>> ax.set_ylim(0,1)
>> show() # hmmmm... nothing yet
>> draw() # force a draw; now it works
>>
...
> Just an observation (I haven't tested anything)... But what is up with
> the call to plot()? It might be causing issues with the autoscaler.
> Any line collections created without other plotting functions is going
> to need the axes limits set.
>
> Ben Root
>
Yeah, that was weird. :)
I added that when I was first messing around, and the axes didn't show
up even when I called show(). If you do the draw() at the end, then
you don't need to call plot(), and then you also don't need to mess
with the view limits (set_{x,y}lim).
I guess the moral of the story is, "if you don't explicitly plot() [or
a variant], you must explicitly draw()."
===
from matplotlib.collections import LineCollection
f = figure()
ax = gca()
vec = numpy.random.random((10,3))
segs = []
for i in range(0, len(vec)):
x1 = vec[i][0]
x2 = vec[i][1]
y1 = y2 = vec[i][2]
segs.extend( [[(x1,y1),(x2,y2)]] )
line_segments = LineCollection(segs, linewidth=3, alpha=0.3,
colors='r', linestyle='solid')
ax.add_collection(line_segments)
draw() # force a draw; now it works
====
|
|
From: Benjamin R. <ben...@ou...> - 2011-07-14 14:24:32
|
On Thursday, July 14, 2011, Pau <vim...@go...> wrote: > Hi, > > I have a very naive question ... howmdo I pass an arg to a matplotlib > script? I need to run MyScript 34 12 67 25 for the script to use those > numbers to multiply quantities for producing a plot... I am using > sysarg[1], 2, 3 but is seems not to work. > > thanks > Could you attach your script so that we can see if there is a mistake of some sort. Ben Root |
|
From: JD83 <jd...@fr...> - 2011-07-14 10:39:00
|
Sorry, it doesn't work.
ax.set_ylabel("foo")
doesn't change anything (before "ax.yaxis.cla()").
And f.clf(keep_observers=False) still locks the process.
But maybe I used wrong terms. Here is the displays ; left before the
clearing ; right, after the clearing ; the plot is correctly renewed, but
the ticks labels are printed over the previous ones.
http://old.nabble.com/file/p32060202/Capture-6.png
Thank you.
JD
--
View this message in context: http://old.nabble.com/Clearing-the-axis-in-a-figure-embedded-in-Tkinter-tp32054762p32060202.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: JD83 <jd...@fr...> - 2011-07-14 10:38:00
|
Sorry, it doesn't work.
ax.set_ylabel("foo")
doesn't change anything (before "ax.yaxis.cla()").
And f.clf(keep_observers=False) still locks the process.
But maybe I used wrong terms. Here is the displays ; left before the
clearing ; right, after the clearing ; the plot is correctly renewed, but
the ticks labels are printed over the previous ones.
http://old.nabble.com/file/p32060191/Capture-6.png Capture-6.png
Thank you.
JD
--
View this message in context: http://old.nabble.com/Clearing-the-axis-in-a-figure-embedded-in-Tkinter-tp32054762p32060191.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Pau <vim...@go...> - 2011-07-14 08:13:54
|
Hi, I have a very naive question ... howmdo I pass an arg to a matplotlib script? I need to run MyScript 34 12 67 25 for the script to use those numbers to multiply quantities for producing a plot... I am using sysarg[1], 2, 3 but is seems not to work. thanks |
|
From: Eric F. <ef...@ha...> - 2011-07-14 07:33:36
|
On 07/13/2011 09:18 PM, Armagan Tarim wrote: > Hi All, > I have tried the sample PySide code given at > http://www.scipy.org/Cookbook/Matplotlib/PySide > the below excerpt is from my "Python Shell" for this sample code, which > gives this error, Github master works with pyside. It is expected to emerge as a release within a few weeks. Eric > "ImportError: Warning: formlayout requires PyQt4 >v4.3" > It seems that it is looking for PyQt; but the whole point of using > PySide is to avoid using PyQt. > Any help is appreciated. > -- Armagan > Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. > >>> import sys > >>> import matplotlib > >>> matplotlib.use('Qt4Agg') > >>> import pylab > Traceback (most recent call last): > File "<pyshell#3>", line 1, in <module> > import pylab > File "C:\Python27\lib\site-packages\pylab.py", line 1, in <module> > from matplotlib.pylab import * > File "C:\Python27\lib\site-packages\matplotlib\pylab.py", line 263, in > <module> > from matplotlib.pyplot import * > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 95, in > <module> > new_figure_manager, draw_if_interactive, show = pylab_setup() > File "C:\Python27\lib\site-packages\matplotlib\backends\__init__.py", > line 25, in pylab_setup > globals(),locals(),[backend_name]) > File > "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4agg.py", > line 12, in <module> > from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ > File "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4.py", > line 18, in <module> > import matplotlib.backends.qt4_editor.figureoptions as figureoptions > File > "C:\Python27\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py", > line 11, in <module> > import matplotlib.backends.qt4_editor.formlayout as formlayout > File > "C:\Python27\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py", > line 51, in <module> > raise ImportError, "Warning: formlayout requires PyQt4 >v4.3" > ImportError: Warning: formlayout requires PyQt4 >v4.3 > > ------------------------------------------------- > > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Armagan T. <ar...@ya...> - 2011-07-14 07:18:19
|
Hi All, I have tried the sample PySide code given at http://www.scipy.org/Cookbook/Matplotlib/PySide the below excerpt is from my "Python Shell" for this sample code, which gives this error, "ImportError: Warning: formlayout requires PyQt4 >v4.3" It seems that it is looking for PyQt; but the whole point of using PySide is to avoid using PyQt. Any help is appreciated. -- Armagan Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import sys >>> import matplotlib >>> matplotlib.use('Qt4Agg') >>> import pylab Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> import pylab File "C:\Python27\lib\site-packages\pylab.py", line 1, in <module> from matplotlib.pylab import * File "C:\Python27\lib\site-packages\matplotlib\pylab.py", line 263, in <module> from matplotlib.pyplot import * File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 95, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "C:\Python27\lib\site-packages\matplotlib\backends\__init__.py", line 25, in pylab_setup globals(),locals(),[backend_name]) File "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 12, in <module> from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ File "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4.py", line 18, in <module> import matplotlib.backends.qt4_editor.figureoptions as figureoptions File "C:\Python27\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py", line 11, in <module> import matplotlib.backends.qt4_editor.formlayout as formlayout File "C:\Python27\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py", line 51, in <module> raise ImportError, "Warning: formlayout requires PyQt4 >v4.3" ImportError: Warning: formlayout requires PyQt4 >v4.3 ------------------------------------------------- |
|
From: mdekauwe <mde...@gm...> - 2011-07-14 05:46:59
|
Hi, I am trying to plot some arrays with missing data, noted as -9999.9. I have tried setting these values to NaN and using numpy masked arrays. Neither produces the correct plot when using box plot. Any suggestions? e.g. import matplotlib.pyplot as plt import numpy as np # works fine y = np.array([568., 576., 436.]) plt.boxplot(y, notch=0, sym='+', vert=1, whis=1.5) plt.show() # same array, but with some missing data x = np.array([-9999.9, 568., -9999.9, -9999.9, 576., -9999.9, 436.]) # mark missing data xx = np.where(x < -9000.0, np.nan, x) # try and plot that, nope. plt.boxplot(xx, notch=0, sym='+', vert=1, whis=1.5) plt.show() # mask the array, plot that? xxx = np.ma.array(xx, mask=np.isnan(xx)) plt.boxplot(xxx, notch=0, sym='+', vert=1, whis=1.5) plt.show() thanks Martin -- View this message in context: http://old.nabble.com/Box-plot-and-missing-data-%28NaN-Masked%29-tp32058883p32058883.html Sent from the matplotlib - users mailing list archive at Nabble.com. |