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
(5) |
2
(4) |
3
|
4
(9) |
5
(4) |
6
(9) |
7
(13) |
8
(11) |
9
(7) |
10
(7) |
11
(22) |
12
(19) |
13
(11) |
14
(20) |
15
(21) |
16
(1) |
17
(1) |
18
(8) |
19
(3) |
20
(5) |
21
(5) |
22
(9) |
23
(3) |
24
(3) |
25
(14) |
26
(12) |
27
(29) |
28
(18) |
29
(11) |
30
(2) |
John: What I need to do is create drawings of windows (as in plug holes in houses and let in light) with grid and other options on the fly. So what I need are the graphic primitives -- canvas, lines, fills ... The output needs to be a graphic file. I will go back and study the docs, but a suggestion of what area to use would be most welcome. Or, of course, a different module than matplotlib if that would be more appropriate. Thanks, Jim On Wednesday 06 April 2005 08:13 pm, you wrote: > >>>>> "jim" == jim <jl...@yv...> writes: > > jim> Running this script gives the results below #! /usr/bin/env > jim> python > > jim> from matplotlib.backends.backend_agg import RendererAgg from > jim> matplotlib.transforms import Value > > I know there are examples in the pdf user's guide discussing how to > use the backend renderer directly, and these are meant mostly to be > helpful to matplotlib developers. Unfortunately, the guide has lagged > behind the current development state. The backend renderer API is in > a transition state right now as we try to introduce some new methods > to solve some old problems. In particular, the draw_lines method that > you are experiencing problems with has recently had a change in its > call signature. > > These changes have been discussed at some length recently on the > matplotlib-devel list. If you are interested, you might want to > browse the matplotlib-devel archives and/or join the mailing list; see > for example > http://sourceforge.net/mailarchive/forum.php?thread_id=6938045&forum_id=36187 . > > Thanks for reporting this discrepancy -- in the near term the backend > API shouldn't be used on the user side. If there is something you > want to do but can't in the current API let me know. > > As for the platform specific differences you report, my first guess is > that the matplotlib versions may not be the same. I wouldn't expect > platform specific differences in the backend API for the same version. > > JDH > > > >
>>>>> "jim" == jim <jl...@yv...> writes: jim> Running this script gives the results below #! /usr/bin/env jim> python jim> from matplotlib.backends.backend_agg import RendererAgg from jim> matplotlib.transforms import Value I know there are examples in the pdf user's guide discussing how to use the backend renderer directly, and these are meant mostly to be helpful to matplotlib developers. Unfortunately, the guide has lagged behind the current development state. The backend renderer API is in a transition state right now as we try to introduce some new methods to solve some old problems. In particular, the draw_lines method that you are experiencing problems with has recently had a change in its call signature. These changes have been discussed at some length recently on the matplotlib-devel list. If you are interested, you might want to browse the matplotlib-devel archives and/or join the mailing list; see for example http://sourceforge.net/mailarchive/forum.php?thread_id=6938045&forum_id=36187 . Thanks for reporting this discrepancy -- in the near term the backend API shouldn't be used on the user side. If there is something you want to do but can't in the current API let me know. As for the platform specific differences you report, my first guess is that the matplotlib versions may not be the same. I wouldn't expect platform specific differences in the backend API for the same version. JDH
Running this script gives the results below #! /usr/bin/env python from matplotlib.backends.backend_agg import RendererAgg from matplotlib.transforms import Value dpi = Value(100.0) o = RendererAgg(100,200, dpi) gc = o.new_gc() gc.set_foreground('k') face = (1,1,1) gc.set_linewidth(1) o.draw_rectangle(gc, face, 0,0, 100,200) o.draw_lines(gc, (1,100,1), (1,100,200)) o._renderer.write_png("test.png") #*** Results from running the above **************** # J:\>python test4.py # Traceback (most recent call last): # File "test4.py", line 16, in ? # o.draw_lines(gc, x, y) # IndexError: Unexpected SeqBase<T> length. # # J:\> #**************************************************** Running in on linux-gentoo 2004 runs just fine. Gives the expected output file. My windows setup is win2k, python2.4 I loaded numeric and numarray. Gives the same results in either case. I have Borland5.5 installed have build an extension with it. Other than that have several other nonstock modules installed. Running it on win98 with python 2.4 gives a different error, but much the same effect. Thanks in advance Jim Hurlburt Yakima, WA
John Hunter wrote: >>>>>>"Fernando" == Fernando Perez <Fer...@co...> writes: > > Fernando> Oh, I don't think it's necessarily a leak. Simply a ton > Fernando> of unreachable stuff lying around, which a call to > Fernando> gc.collect() may help with. > > I hope you're right -- matplotlib uses a lot of cyclic references. > But if he's using the pylab interface to manage the figure windows, > the destroy event of the window manager already triggers a call to > gc.collect in the _pylab_helpers module. Never mind then. If gc.collect is already called reasonably often, an extra manual call will do zilch. Sorry. Best, f
>>>>> "Fernando" == Fernando Perez <Fer...@co...> writes: Fernando> Oh, I don't think it's necessarily a leak. Simply a ton Fernando> of unreachable stuff lying around, which a call to Fernando> gc.collect() may help with. I hope you're right -- matplotlib uses a lot of cyclic references. But if he's using the pylab interface to manage the figure windows, the destroy event of the window manager already triggers a call to gc.collect in the _pylab_helpers module. JDH
John Hunter wrote: >>>>>>"Fernando" == Fernando Perez <Fer...@co...> writes: > > > Fernando> You can try to do: > > Fernando> import gc gc.collect() > > Fernando> This will force the garbage collector to kick in, which > Fernando> sometimes may help. > > I'm not seeing any leak on linux with my standard memory leak test, eg > > unit/memleak_hawaii3.py > > in CVS. Oh, I don't think it's necessarily a leak. Simply a ton of unreachable stuff lying around, which a call to gc.collect() may help with. Best, f
>>>>> "Fernando" == Fernando Perez <Fer...@co...> writes: Fernando> You can try to do: Fernando> import gc gc.collect() Fernando> This will force the garbage collector to kick in, which Fernando> sometimes may help. I'm not seeing any leak on linux with my standard memory leak test, eg unit/memleak_hawaii3.py in CVS. Have you read over http://matplotlib.sourceforge.net/faq.html#LEAKS Unfortunately, the standard idiom I use for testing memory usage is platform specific. A complete script which exposes the leak would help... JDH
D Brown wrote: > I'm writing batch plotting code in the "traditional" sloppy > way by typing scripts from the command line in ipython > until I get what I want and then stringing the lines > together in a file. Then I put the whole thing in a loop > and use run from ipython. Now I can batch process a bunch > of .cvs files into nice plots. > > I have two problems though: > > 1. The memory use in python increases about 5-10MB /sec > during processing. I have pylab.ioff() in the loop and put > a pylab.close('all') in the loop to try to close the figure > and release memory. Now 24 files processed results in > ~190MB memory use. When I run again it keeps increasing. > I'm basically drawing the fig with several subplots and > labels and then using savefig() to save it to a .png file. > Is there some way to release memory explicity? I'm using > WinXP and tkAgg backend. I've tried things like gca() and > clf() at the beginning of the script to try to reuse the > canvas but It's not clear it it helps. Sometimes if I wait > long enough the memory use goes down so I don't suspect > it's not a memory leak, but garbage collection problem. > Unfortunately the wait can be very long. General as well > as specific tips are wellcome. You can try to do: import gc gc.collect() This will force the garbage collector to kick in, which sometimes may help. Best, f
I'm writing batch plotting code in the "traditional" sloppy way by typing scripts from the command line in ipython until I get what I want and then stringing the lines together in a file. Then I put the whole thing in a loop and use run from ipython. Now I can batch process a bunch of .cvs files into nice plots. I have two problems though: 1. The memory use in python increases about 5-10MB /sec during processing. I have pylab.ioff() in the loop and put a pylab.close('all') in the loop to try to close the figure and release memory. Now 24 files processed results in ~190MB memory use. When I run again it keeps increasing. I'm basically drawing the fig with several subplots and labels and then using savefig() to save it to a .png file. Is there some way to release memory explicity? I'm using WinXP and tkAgg backend. I've tried things like gca() and clf() at the beginning of the script to try to reuse the canvas but It's not clear it it helps. Sometimes if I wait long enough the memory use goes down so I don't suspect it's not a memory leak, but garbage collection problem. Unfortunately the wait can be very long. General as well as specific tips are wellcome. 2. If I use show() or ion() the new plot window pops up where it likes, usually on top of my other windows. Is there a way to control this better? This may be a FAQ but I didn't see it. In enviroments like IDL there is a "window" command for this. Curious what Matlab does and if there is a platform independent pylab equivalent. -- David +_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+ __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com
>>>>> "Daisy" == Daisy Fuentes <eli...@ya...> writes: Daisy> John, Thank you for your reply. A couple of issues though. Daisy> I looked at the documentation and saw the alpha Daisy> transperancy parameter, but for some reason I was still Daisy> getting the same results. Maybe I am missing something Daisy> very fundamental. If alpha is not provided then the Daisy> default is for the candlestick box not to be transperant, Daisy> correct? Even changing the alpha value wouldn't produced Daisy> desired results, I can increase transperancy, but not Daisy> eliminate it. I wasn't seeing that since I can still see Daisy> the lines (wicks) go through the boxes that's why I asked Daisy> here. Also, this may be another foolish oversight on my OK, I see what is going on. The lines are being plotted over the rectangles, so even if the rectangles are transparent, you still see the lines. There are two candlestick functions in matplotlib candlestick and candlestick2. They have slightly different call signatures and a different implementation under the hood. candlestick creates a bunch of separate lines and rectangles, candlestick2 uses collections (see the help for the matplotlib.collections module). You can control the z-ordering on the plot by setting the zorder property (see examples/zorder_demo.py). For candlestick (see examples/candlestick_demo.py) you would do lines, patches = candlestick(ax, quotes, width=0.6) set(lines, zorder=0.9*patches[0].zorder) for candlestick2 you would do (untested) linecol, rectcol = candlestick2(blah) z = rectcol.get_zorder() linecol.set_zorder(0.9*z) Daisy> part, but how come when I have candlestick2(axMiddle, Daisy> opens, closes, highs, lows, width=4, colorup='k', Daisy> colordown='r') instead of getting a bar colored black when Daisy> it closes above the open price I get the opposite --- red? Daisy> It seems colorup should be black, colordown -- red as in Daisy> colorup : the color of the lines where close >= open Daisy> colordown : the color of the lines where close < open Argg, that's embarrassing. Good thing mpl is distributed with no warranties.... No telling how many billions this bug has cost the wall street barons already! In matplotlib/finance.py in the candlestick2 function, find this code colord = { True : colorup, False : colordown, } colors = [colord[open>=close] for open, close in zip(opens, closes) if open!=-1 and close !=-1] That should read colors = [colord[close>=open] for open, close in zip(opens, closes) if open!=-1 and close !=-1] right? I believe this is already correct in candlestick, so this is a candlestick2 specific bug. Daisy> As far as the moving average calculation, I did see the Daisy> disclaimer and didn't mean to be a stickler, it just seem a Daisy> bit misleading to me as I was trying to do the Exponential Daisy> Moving Average calculation and compare the results to the Daisy> actual financial charts. They didn't match and I thought I Daisy> would point that out. OK, if you submit a replacement function that better matches actual plots, I will be happy to include it. Thanks for the report! JDH
>>>>> "Sascha" == Sascha Schnepp <sc...@te...> writes: Sascha> Hi everybody, I'm new to this list, so please don't be too Sascha> impatient... Sascha> I would like to know which possibilities I have to Sascha> customize the legend. I already found how to change the Sascha> font size using font_manager and FontProperties. What I'd Sascha> like to have is a slight gray legend background. Is this Sascha> possible? Hi Sascha, The way to customize the legend is to get the legend instance back from the legend command. Then you can call any of the methods available for the legend. You can read about these by doing from the python shell >>> leg = legend(blha, blah) >>> help(leg) or reading the site documentation at http://matplotlib.sourceforge.net/matplotlib.legend.html#Legend . To customize the rectangular box around the legend, use >>> rect = leg.get_frame() rect is a Rectangle instance, documented at http://matplotlib.sourceforge.net/matplotlib.patches.html#Rectangle . To change the facecolor to gray, you need to call >>> rect.set_facecolor(0.8) # a grayscale intensity or >>> rect.set_facecolor('gray') There are many wanys to set colors in matplotlib, these are discussed at http://matplotlib.sourceforge.net/matplotlib.pylab.html#-colors In particular, see examples/legend_demo.py that comes with the matplotlib source distribution (and is also available here http://matplotlib.sourceforge.net/matplotlib_examples_0.74.zip ). This example shows you how to set the background color and more. Hope this helps, JDH
jdh...@ac... a écrit : > While I was at it, I also implemented unicode support for the *Agg and > PS backends :-) If you have access to CVS, you may want to give it a > test drive. See examples/unicode_demo.py. CVS mirrors may lag. Wonderful! Unfortunately I don't have enough room on my disk for a compilation from CVS sources and the Debian package isn't out yet... So I'll try next time I boot on Windows! > If they are looking for someone to pay.... :-) > > JDH It would really be a good idea. One never knows, maybe one day? JM. Philippe
On Apr 4, 2005, at 5:34 PM, Daishi Harada wrote: > FWIW, twm seems to be the only WM that works for me. > I tried Xorg with fvwm, windowmaker, metacity, and blackbox - > none of these seem to work. (All of this is through fink.) The culprit was the fact that I have a dual display setup where the two displays aren't of the same size. This made my display region not rectangular, and in particular I had a undisplayable "hole" in the upper left-hand region of the rectangular bounding box of my two screens. Hence when a X11 window was auto-mapped to somewhere near +0+0, it was rendered into a void. I'm not sure if the "fault" is with XDarwin or the window managers. The reason twm seemed to "work" was because twm doesn't automap any new windows unless explicitly set by -geometry, and initializes the window placement operation with the current mouse cursor location. I'm surprised I hadn't been bit by this previously, but then I've never entirely understood the window auto- placement algorithm used by most windowmanagers. d
Hi everybody, I'm new to this list, so please don't be too impatient... I would like to know which possibilities I have to customize the legend. = I already found how to change the font size using font_manager and FontPr= operties. What I'd like to have is a slight gray legend background. Is th= is possible? Greetings, Sascha
Hi, I'm using Mac OS X 10.3 with fink. I've used matlabplot before, but since I've apt-get'd and upgrade'd-all, I've been getting the errors: /sw/lib/python2.4/site-packages/matplotlib/font_manager.py:425: UserWarning: Could not open font file /Library/Fonts/NISC18030.ttf warnings.warn("Could not open font file %s"%fpath) ** (bubba.py:15740): WARNING **: `GtkTextSearchFlags' is not an enum type ** (bubba.py:15740): WARNING **: Cannot open font file for font Helvetica 10 ** (bubba.py:15740): WARNING **: Cannot open fallback font, nothing to do Then, matplotlib stops. I've reinstalled gtk, python, and matplotlib, but simply reinstalling does not seem to work. Does anyone know what's going on? -Jon
On Apr 2, 2005, at 6:23 AM, John Hunter wrote: >>>>>> "Daishi" == Daishi Harada <da...@eg...> writes: > > Daishi> Xorg+twm worked fine while Xorg+quartz-wm didn't. 4. This > Daishi> usage pattern used to work, although I can't seem to > Daishi> recreate a working configuration right now. > > On my power book ssh-ing into a linux box, I can run wx and wxagg > examples, and other backends as well. > > How can I determine which window manager (twm vs quartz-wm) I am > running? FWIW, twm seems to be the only WM that works for me. I tried Xorg with fvwm, windowmaker, metacity, and blackbox - none of these seem to work. (All of this is through fink.) > JDH >
John, Thank you for your reply. A couple of issues though. I looked at the documentation and saw the alpha transperancy parameter, but for some reason I was still getting the same results. Maybe I am missing something very fundamental. If alpha is not provided then the default is for the candlestick box not to be transperant, correct? Even changing the alpha value wouldn't produced desired results, I can increase transperancy, but not eliminate it. I wasn't seeing that since I can still see the lines (wicks) go through the boxes that's why I asked here. Also, this may be another foolish oversight on my part, but how come when I have candlestick2(axMiddle, opens, closes, highs, lows, width=4, colorup='k', colordown='r') instead of getting a bar colored black when it closes above the open price I get the opposite --- red? It seems colorup should be black, colordown -- red as in colorup : the color of the lines where close >= open colordown : the color of the lines where close < open As far as the moving average calculation, I did see the disclaimer and didn't mean to be a stickler, it just seem a bit misleading to me as I was trying to do the Exponential Moving Average calculation and compare the results to the actual financial charts. They didn't match and I thought I would point that out. --- John Hunter <jdh...@ac...> wrote: > >>>>> "Daisy" == Daisy Fuentes <eli...@ya...> > writes: > > Daisy> I was looking at the example located @ > Daisy> > http://matplotlib.sourceforge.net/screenshots/finance_work2.py > Daisy> and was wondering if it's possible to > color the candlestick > Daisy> boxes so that the candlestick wicks are > not visible through > Daisy> them. > > Yes, the alpha argument to the candlestick plot > controls the > transparency. alpha is the traditional name for the > transparency > level, so look for it in documentation strings, eg > in > > http://matplotlib.sf.net/matplotlib.finance.html#-candlestick > > Daisy> Additionally, is it possible to have a > candlestick > Daisy> that's not just a plain line when the > open and the close > Daisy> prices are the same. Would it be possible > to add a > Daisy> horizontal tick mark? > Daisy> | > Daisy> | > Daisy> - > Daisy> | > Daisy> | > > You can add these marks fairly easily yourself by > adding an additional > plot command, and using the marker style TICKLEFT or > TICKRIGHT. In > other words, you can plot any kind of line you want > more or less. The > candlestick method may not support it directly, but > it is easy to > overlay. We should probably add a marker style > TICKCENTERX for this > kind of marker, and better add TICKCENTERY for > symmetry. It's only a > few lines of code that need to be added to the > lines.py module. > > Daisy> Also, I noticed that the simple moving > average is > Daisy> calculated based on the price open > instead of price close. > > I'm not attempting to make a financially meaningful > plot, but to > illustrate plotting techniques. You are free to do > moving averages > over open, close, average or random data. As I note > in the > finance_work screenshot text > > Some of the data in the plot, are real financial > data, some are > random traces that I used since the goal was to > illustrate plotting > techniques, not market analysis! > > Hope this helps, > JDH > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com
John, Thank you for your reply. A couple of issues though. I looked at the documentation and saw the alpha transperancy parameter, but for some reason I was still getting the same results. Maybe I am missing something very fundamental. If alpha is not provided then the default is for the candlestick box not to be transperant, correct? Even changing the alpha value wouldn't produced desired results, I can increase transperancy, but not eliminate it. I wasn't seeing that since I can still see the lines (wicks) go through the boxes that's why I asked here. Also, this may be another foolish oversight on my part, but how come when I have candlestick2(axMiddle, opens, closes, highs, lows, width=4, colorup='k', colordown='r') instead of getting a bar colored black when it closes above the open price I get the opposite --- red? It seems colorup should be black, colordown -- red as in colorup : the color of the lines where close >= open colordown : the color of the lines where close < open As far as the moving average calculation, I did see the disclaimer and didn't mean to be a stickler, it just seem a bit misleading to me as I was trying to do the Exponential Moving Average calculation and compare the results to the actual financial charts. They didn't match and I thought I would point that out. --- John Hunter <jdh...@ac...> wrote: > >>>>> "Daisy" == Daisy Fuentes <eli...@ya...> > writes: > > Daisy> I was looking at the example located @ > Daisy> > http://matplotlib.sourceforge.net/screenshots/finance_work2.py > Daisy> and was wondering if it's possible to > color the candlestick > Daisy> boxes so that the candlestick wicks are > not visible through > Daisy> them. > > Yes, the alpha argument to the candlestick plot > controls the > transparency. alpha is the traditional name for the > transparency > level, so look for it in documentation strings, eg > in > > http://matplotlib.sf.net/matplotlib.finance.html#-candlestick > > Daisy> Additionally, is it possible to have a > candlestick > Daisy> that's not just a plain line when the > open and the close > Daisy> prices are the same. Would it be possible > to add a > Daisy> horizontal tick mark? > Daisy> | > Daisy> | > Daisy> - > Daisy> | > Daisy> | > > You can add these marks fairly easily yourself by > adding an additional > plot command, and using the marker style TICKLEFT or > TICKRIGHT. In > other words, you can plot any kind of line you want > more or less. The > candlestick method may not support it directly, but > it is easy to > overlay. We should probably add a marker style > TICKCENTERX for this > kind of marker, and better add TICKCENTERY for > symmetry. It's only a > few lines of code that need to be added to the > lines.py module. > > Daisy> Also, I noticed that the simple moving > average is > Daisy> calculated based on the price open > instead of price close. > > I'm not attempting to make a financially meaningful > plot, but to > illustrate plotting techniques. You are free to do > moving averages > over open, close, average or random data. As I note > in the > finance_work screenshot text > > Some of the data in the plot, are real financial > data, some are > random traces that I used since the goal was to > illustrate plotting > techniques, not market analysis! > > Hope this helps, > JDH > __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com
>>>>> "Daisy" == Daisy Fuentes <eli...@ya...> writes: Daisy> I was looking at the example located @ Daisy> http://matplotlib.sourceforge.net/screenshots/finance_work2.py Daisy> and was wondering if it's possible to color the candlestick Daisy> boxes so that the candlestick wicks are not visible through Daisy> them. Yes, the alpha argument to the candlestick plot controls the transparency. alpha is the traditional name for the transparency level, so look for it in documentation strings, eg in http://matplotlib.sf.net/matplotlib.finance.html#-candlestick Daisy> Additionally, is it possible to have a candlestick Daisy> that's not just a plain line when the open and the close Daisy> prices are the same. Would it be possible to add a Daisy> horizontal tick mark? Daisy> | Daisy> | Daisy> - Daisy> | Daisy> | You can add these marks fairly easily yourself by adding an additional plot command, and using the marker style TICKLEFT or TICKRIGHT. In other words, you can plot any kind of line you want more or less. The candlestick method may not support it directly, but it is easy to overlay. We should probably add a marker style TICKCENTERX for this kind of marker, and better add TICKCENTERY for symmetry. It's only a few lines of code that need to be added to the lines.py module. Daisy> Also, I noticed that the simple moving average is Daisy> calculated based on the price open instead of price close. I'm not attempting to make a financially meaningful plot, but to illustrate plotting techniques. You are free to do moving averages over open, close, average or random data. As I note in the finance_work screenshot text Some of the data in the plot, are real financial data, some are random traces that I used since the goal was to illustrate plotting techniques, not market analysis! Hope this helps, JDH
>>>>> "David" == David Meggy <dav...@ya...> writes: David> Hi I'm trying to produce bar graphs with the format of 3 David> per page all sharing a common x-axis. I have done this and David> each graph properly has its own title, and y labels, while David> only the bottom graph has x labels. Have you seen examples/ganged_plots.py and examples/shared_axis_demo.py? These specifically address sharing of an axis (eg when navigating) and also illustrate some useful calls for controlling ticking, etc... David> My problem is that I would like to add a title to the David> entire page, and add a box of information (legend or key I David> guess) that applies to all 3 graphs, and not any in David> particular. I hope that made sense. If fig is a matplotlib.figure.Figure instance fig.text : add text in figure coords; see examples/figtext.py fig.legend : add a legend to the figure (rather than Axes); see examples/figlegend_demo.py See http://matplotlib.sf.net/matplotlib.figure.html for the Figure class documentation. David> the table function destroys my x-labels and doesn't format David> very well. The table can be placed in a number of different locations by passing in the "loc" code. This can be one of 'upper right' 'upper left' 'lower left' 'lower right' 'center left' 'center right' 'lower center' 'upper center' 'center' 'top right' 'top left' 'bottom left' 'bottom right' 'right' 'left' 'top' 'bottom' Also, try changing the size of your axes manually by using "axes" rather than "subplot". See also the advice at http://matplotlib.sourceforge.net/faq.html#TEXTOVERLAP David> <my ascii drawing representation of what I'm looking for> Now we just need to write an ascii backend to facilitate this kind of communication :-) JDH
Thanks for your reply. On Apr 2, 2005, at 6:23 AM, John Hunter wrote: > On my power book ssh-ing into a linux box, I can run wx and wxagg > examples, and other backends as well. I'd be happy to find that the problem is in my local configuration; I just can't seem to figure out what to tweak locally. > How can I determine which window manager (twm vs quartz-wm) I am > running? I usually just do something like "ps auwx | grep wm" and look for a process that I recognize as a window manager. (Note this won't work if you're using one of those "modern" window managers that don't suffix their program name with "wm", like metacity or blackbox). If you're using the Apple-supplied X11 server then as a default you would be using quartz-wm. If this is working for you then the problem is almost certainly on my end. > JDH Thanks again, d
>>>>> "kristen" == kristen kaasbjerg <co...@ya...> writes: kristen> Hi John When I try to save any figure with a grid in .eps kristen> format, I get an error message. I am using the 0.74 kristen> version. Hi Kristen, Hmm, I don't get the crash. In [1]: plot([1,2,3]) Out[1]: [<matplotlib.lines.Line2D instance at 0x4202b26c>] In [2]: grid() In [3]: savefig('test.eps') Sometimes it helps to delete site-packages/matplotlib and your build subdirectory to insure a clean install, though I don't think that is the problem here. Could you post a complete script that exposes the bug, run it with the --verbose-helpful flag and report the output, and attach an rc file if you are doing any customizations to it besides changing the default backend. Thanks, JDH
Hi John When I try to save any figure with a grid in .eps format, I get an error message. I am using the 0.74 version. The error message: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/camp/s991416/lib/python/matplotlib/pylab.py", line 720, in savefig return fig.savefig(*args, **kwargs) File "/home/camp/s991416/lib/python/matplotlib/figure.py", line 512, in savefig self.canvas.print_figure(*args, **kwargs) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_tkagg.py", line 161, in print_figure agg.print_figure(filename, dpi, facecolor, edgecolor, orientation) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_agg.py", line405, in print_figure ps.print_figure(filename, dpi, facecolor, edgecolor, orientation) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_ps.py", line 742, in print_figure self.figure.draw(renderer) File "/home/camp/s991416/lib/python/matplotlib/figure.py", line 395, in draw for a in self.axes: a.draw(renderer) File "/home/camp/s991416/lib/python/matplotlib/axes.py", line 1362, in draw self.xaxis.draw(renderer) File "/home/camp/s991416/lib/python/matplotlib/axis.py", line 524, in draw tick.draw(renderer) File "/home/camp/s991416/lib/python/matplotlib/axis.py", line 136, in draw if midPoint and self.gridOn: self.gridline.draw(renderer) File "/home/camp/s991416/lib/python/matplotlib/lines.py", line 286, in draw lineFunc(renderer, gc, xt, yt) File "/home/camp/s991416/lib/python/matplotlib/lines.py", line 572, in _draw_dotted renderer.draw_lines(gc, xt, yt) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_ps.py", line 367, in draw_lines self._draw_lines(gc,to_draw) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_ps.py", line 350, in _draw_lines self._draw_ps("\n".join(ps), gc, None) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_ps.py", line 557, in _draw_ps self.set_linewidth(gc.get_linewidth()) File "/home/camp/s991416/lib/python/matplotlib/backends/backend_ps.py", line 112, in set_linewidth self._pswriter.write("%1.3f setlinewidth\n"%linewidth) TypeError: float argument required __________________________________ Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. http://www.advision.webevents.yahoo.com/emoticontest
David Meggy wrote: > On Mon, 2005年04月04日 at 11:03 +1000, Robert Leftwich wrote: > >>David Meggy wrote: >> >>>What functions should I be looking at to post this extra information? >> >>You can use the axis text() function to write arbitrary text on a graph. See the >>align text example (http://matplotlib.sourceforge.net/screenshots/align_text.py) >>and its image (http://matplotlib.sourceforge.net/screenshots/align_text_large.png). > > > That looks useful, but the text is still specific to a particular > subplot. I want the text totally separate. You can add text to the figure by using figure.text(..) as well (see figure.py in matplotlib). (Caveat - I've never actually used this approach) Robert
Hi I'm trying to produce bar graphs with the format of 3 per page all sharing a common x-axis. I have done this and each graph properly has its own title, and y labels, while only the bottom graph has x labels. My problem is that I would like to add a title to the entire page, and add a box of information (legend or key I guess) that applies to all 3 graphs, and not any in particular. I hope that made sense. the table function destroys my x-labels and doesn't format very well. What functions should I be looking at to post this extra information? <my ascii drawing representation of what I'm looking for> PAGE TITLE Bar graph 1 -title | y-labels | bar graph 1 | | | ---------------------------- Bar graph 2 -title | y-labels | bar graph 2 | | | ---------------------------- Bar graph 3 -title | y-labels | bar graph 3 | | | ---------------------------- x-labels Page information -legend/key </bad ascii art> -- David Meggy <dav...@ya...>