From: John H. <jdh...@ac...> - 2005-04-04 20:55:52
|
>>>>> "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 |