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
(11) |
2
(1) |
3
(5) |
4
(25) |
5
(14) |
6
(36) |
7
(13) |
8
(15) |
9
|
10
(5) |
11
(5) |
12
(11) |
13
(15) |
14
(9) |
15
(16) |
16
(3) |
17
(13) |
18
(7) |
19
(9) |
20
(12) |
21
(2) |
22
(6) |
23
|
24
(2) |
25
(1) |
26
(16) |
27
(7) |
28
(11) |
29
(8) |
30
(1) |
John, Thanks for the information. I might start looking at the code and see if I can make any changes. If I'm successful then I'll submit these as patches. Gerardo > > >No, there isn't, but patches here would be most welcome since this has >come up before.... > >JDH
>>>>> "Gerardo" == Gerardo Rivera <Ger...@jp...> writes: Gerardo> Hi, I'm currently using matplotlib with Plone/Zope to Gerardo> generate some graphics for temperature, wind speed and Gerardo> wind direction based on some data from Lake Tahoe. Gerardo> However, the currently layout of the legends box really Gerardo> restricts me from displaying the full set of data points Gerardo> on one graph. Gerardo> Currently the legend layout is displayed as: Gerardo> line1_color label1 line2_color label2 line3_color label3 Gerardo> ... Gerardo> we want horizontal layout: Gerardo> line1_color label1 line2_color label2 line3_color label3 Gerardo> ... Gerardo> Also placing the horizontal layout below the x-axis title Gerardo> would be ideal. Gerardo> Is there a way to create the horizontal layout in the Gerardo> current version of matplotlib? No, there isn't, but patches here would be most welcome since this has come up before.... JDH
Hi, I'm currently using matplotlib with Plone/Zope to generate some graphics for temperature, wind speed and wind direction based on some data from Lake Tahoe. However, the currently layout of the legends box really restricts me from displaying the full set of data points on one graph. Currently the legend layout is displayed as: line1_color label1 line2_color label2 line3_color label3 ... we want horizontal layout: line1_color label1 line2_color label2 line3_color label3 ... Also placing the horizontal layout below the x-axis title would be ideal. Is there a way to create the horizontal layout in the current version of matplotlib? I noticed that someone created a column layout in Aug 2006 but actually changed the legend code. If I need to I could look at the legend code myself to get the needed results. I'm using the following: matplotlib 0.87.5 python 2.3.5, win32 Zope 2.7.8 Plone 2 Thanks for any help Gerardo Rivera
>>>>> "Scott" == Scott Ransom <sr...@nr...> writes: Scott> Hi All, I think I might have uncovered a bug in the legend Scott> code when using multiple patches so that only the first Scott> patch type is used in the legend. Scott> In [41]: matplotlib.__version__ Out[41]: '0.87.5' Scott> (that is revision 2782 from SVN) Scott> Here is some code that shows the problem: Scott> ------------------------------ from pylab import * Scott> binctrs = linspace(-4.0, 4.0, 15) vals = randn(1000) n1, Scott> bins1, p1 = hist(vals, binctrs, align='center') n2, bins2, Scott> p2 = hist(vals[:300], binctrs, align='center') setp(p1, Scott> 'facecolor', 'k', 'alpha', 0.2) setp(p2, 'facecolor', 'g', Scott> 'alpha', 0.9) legend((p1, p2), ("Frobs", "NewFrobs")) Scott> show() ------------------------------ The returned patches is a list of patches -- you just need to pick off a representative one ax = subplot(111) binctrs = linspace(-4.0, 4.0, 15) vals = randn(1000) n1, bins1, p1 = hist(vals, binctrs, align='center', facecolor='black', alpha=0.2) n2, bins2, p2 = hist(vals[:300], binctrs, align='center', facecolor='green', alpha=0.9) legend((p1[0], p2[0]), ("Frobs", "NewFrobs")) show()
Please disregard, i finally solved my problem using IndexLocator: # datetime variable x is in 15 min intervals, 6 1/2 hours in trading day # results in 26 data points per day, so: days = IndexLocator(26, 1) hours = IndexLocator(4, 1) ax = subplot(111) plot(datesindex, y) ax.xaxis.set_major_locator(days) ax.xaxis.set_major_formatter(IndexDateFormatter(x, '%Y-%m-%d %H:%M:%S')) ax.xaxis.set_minor_locator(hours) ax.xaxis.set_minor_formatter(IndexDateFormatter(x, 'Y-%m-%d %H:%M:%S')) Thanks to all who have help me with previous issues. :) On Wed, 2006年09月27日 at 09:58 -0400, Richard Albright wrote: > I am getting closer to the results I want by modifying my days and hours > locators to read: > > days = WeekdayLocator(byweekday=(MO, TU, WE, TH, FR)) > hours = HourLocator(byhour=range(9,17,1)) > > but the xaxis still fills in times for the rest of each day interval, > but now only shows xtick labels for the period during the day i am > concerned with. Is there a way to limit the hours plotted on the xaxis > for each day interval? > > > On Tue, 2006年09月26日 at 16:47 -0400, Richard Albright wrote: > > I am trying to figure out how i can use IndexLocator with DateFormatter. > > Currently i am only using DayLocator and HourLocator in my code, but it > > is showing ticks for all hours in the plot, when I only care about > > plotting the hours for when data is available. > > > > I already applied date2num to my dates in the x list below. > > > > > > > > from matplotlib.dates import IndexDateFormatter, DateFormatter, date2num > > > > import matplotlib > > > > from matplotlib import rc > > > > import datetime > > from pylab import * > > > > > > x = [732559.39583333337, 732559.40625, 732559.41666666663, > > 732559.42708333337, > > 732559.4375, 732559.44791666663, 732559.45833333337, 732559.46875, > > 732559.47916666663 , 732559.48958333337, 732559.5, > > 732559.51041666663, > > 732559.52083333337, 732559.53125, 732559.54166666663, > > 732559.55208333337, > > 732559.5625, 732559.57291666663, 732559.58333333337, 732559.59375, > > 732559.60416666663, 732559.61458333337, 732559.625, > > 732559.63541666663, > > 732559.64583333337, 732559.65625, 732559.66666666663, > > 732560.39583333337, > > 732560.40625, 732560.41666666663, 732560.42708333337, 732560.4375, > > 732560.44791666663, 732560.45833333337, 732560.46875, > > 732560.47916666663, > > 732560.48958333337, 732560.5, 732560.51041666663, > > 732560.52083333337, > > 732560.53125, 732560.54166666663, 732560.55208333337, 732560.5625, > > 732560.57291666663, 732560.58333333337, 732560.59375, > > 732560.60416666663, > > 732560.61458333337, 732560.625, 732560.63541666663, > > 732560.64583333337, > > 732560.65625, 732560.66666666663] > > y = [13.07, 13.050000000000001, 13.029999999999999, 13.039999999999999, > > 13.029999999999999, 13.0, 13.0, 13.0, 13.0, 13.029999999999999, > > 13.02, > > 13.01, 12.99, 12.98, 12.98, 12.960000000000001, 12.94, 12.92, > > 12.960000000000001, 12.98, 13.19, 13.140000000000001, > > 13.130000000000001, > > 13.109999999999999, 13.08, 13.109999999999999, 13.039999999999999, > > 13.15, > > 13.130000000000001, 13.15, 13.279999999999999, 13.210000000000001, > > 13.199999999999999, 13.199999999999999, 13.19, 13.199999999999999, > > 13.140000000000001, 13.119999999999999, 13.1, 13.09, > > 13.130000000000001, > > 13.119999999999999, 13.130000000000001, 13.130000000000001, > > 13.140000000000001, 13.15, 13.16, 13.119999999999999, > > 13.119999999999999, > > 13.1, 13.050000000000001, 13.029999999999999, 13.02, 13.0] > > > > datesindex = range(len(x)) > > > > days = DayLocator() > > hours = HourLocator() > > ax = subplot(111) > > plot(x, y) > > > > ax.xaxis.set_major_locator(days) > > ax.xaxis.set_major_formatter(DateFormatter('%Y-%m-%d %H:%M:%S')) > > ax.xaxis.set_minor_locator(hours) > > ax.xaxis.set_minor_formatter(DateFormatter('%H:%M:%S')) > > setp(ax.get_xticklabels(), 'rotation', 90, 'horizontalalignment', > > 'center', fontsize=8) > > minorlabels = [tick.label1 for tick in ax.xaxis.get_minor_ticks()] > > setp(minorlabels, 'rotation', 90, 'horizontalalignment', 'center', > > fontsize=8) > > > > grid(True) > > show() > > > > Any suggestions would be greatly appreciated. > > > -- > Rick Albright > Senior Quantitvative Analyst > Indie Research, LLC > 254 Witherspoon Street > Princeton, NJ 08542 > (609)497-1030 > ral...@in... > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Rick Albright Senior Quantitvative Analyst Indie Research, LLC 254 Witherspoon Street Princeton, NJ 08542 (609)497-1030 ral...@in...
I am getting closer to the results I want by modifying my days and hours locators to read: days = WeekdayLocator(byweekday=(MO, TU, WE, TH, FR)) hours = HourLocator(byhour=range(9,17,1)) but the xaxis still fills in times for the rest of each day interval, but now only shows xtick labels for the period during the day i am concerned with. Is there a way to limit the hours plotted on the xaxis for each day interval? On Tue, 2006年09月26日 at 16:47 -0400, Richard Albright wrote: > I am trying to figure out how i can use IndexLocator with DateFormatter. > Currently i am only using DayLocator and HourLocator in my code, but it > is showing ticks for all hours in the plot, when I only care about > plotting the hours for when data is available. > > I already applied date2num to my dates in the x list below. > > > > from matplotlib.dates import IndexDateFormatter, DateFormatter, date2num > > import matplotlib > > from matplotlib import rc > > import datetime > from pylab import * > > > x = [732559.39583333337, 732559.40625, 732559.41666666663, > 732559.42708333337, > 732559.4375, 732559.44791666663, 732559.45833333337, 732559.46875, > 732559.47916666663 , 732559.48958333337, 732559.5, > 732559.51041666663, > 732559.52083333337, 732559.53125, 732559.54166666663, > 732559.55208333337, > 732559.5625, 732559.57291666663, 732559.58333333337, 732559.59375, > 732559.60416666663, 732559.61458333337, 732559.625, > 732559.63541666663, > 732559.64583333337, 732559.65625, 732559.66666666663, > 732560.39583333337, > 732560.40625, 732560.41666666663, 732560.42708333337, 732560.4375, > 732560.44791666663, 732560.45833333337, 732560.46875, > 732560.47916666663, > 732560.48958333337, 732560.5, 732560.51041666663, > 732560.52083333337, > 732560.53125, 732560.54166666663, 732560.55208333337, 732560.5625, > 732560.57291666663, 732560.58333333337, 732560.59375, > 732560.60416666663, > 732560.61458333337, 732560.625, 732560.63541666663, > 732560.64583333337, > 732560.65625, 732560.66666666663] > y = [13.07, 13.050000000000001, 13.029999999999999, 13.039999999999999, > 13.029999999999999, 13.0, 13.0, 13.0, 13.0, 13.029999999999999, > 13.02, > 13.01, 12.99, 12.98, 12.98, 12.960000000000001, 12.94, 12.92, > 12.960000000000001, 12.98, 13.19, 13.140000000000001, > 13.130000000000001, > 13.109999999999999, 13.08, 13.109999999999999, 13.039999999999999, > 13.15, > 13.130000000000001, 13.15, 13.279999999999999, 13.210000000000001, > 13.199999999999999, 13.199999999999999, 13.19, 13.199999999999999, > 13.140000000000001, 13.119999999999999, 13.1, 13.09, > 13.130000000000001, > 13.119999999999999, 13.130000000000001, 13.130000000000001, > 13.140000000000001, 13.15, 13.16, 13.119999999999999, > 13.119999999999999, > 13.1, 13.050000000000001, 13.029999999999999, 13.02, 13.0] > > datesindex = range(len(x)) > > days = DayLocator() > hours = HourLocator() > ax = subplot(111) > plot(x, y) > > ax.xaxis.set_major_locator(days) > ax.xaxis.set_major_formatter(DateFormatter('%Y-%m-%d %H:%M:%S')) > ax.xaxis.set_minor_locator(hours) > ax.xaxis.set_minor_formatter(DateFormatter('%H:%M:%S')) > setp(ax.get_xticklabels(), 'rotation', 90, 'horizontalalignment', > 'center', fontsize=8) > minorlabels = [tick.label1 for tick in ax.xaxis.get_minor_ticks()] > setp(minorlabels, 'rotation', 90, 'horizontalalignment', 'center', > fontsize=8) > > grid(True) > show() > > Any suggestions would be greatly appreciated. > -- Rick Albright Senior Quantitvative Analyst Indie Research, LLC 254 Witherspoon Street Princeton, NJ 08542 (609)497-1030 ral...@in...
Hi All, I think I might have uncovered a bug in the legend code when using multiple patches so that only the first patch type is used in the legend. In [41]: matplotlib.__version__ Out[41]: '0.87.5' (that is revision 2782 from SVN) Here is some code that shows the problem: ------------------------------ from pylab import * binctrs = linspace(-4.0, 4.0, 15) vals = randn(1000) n1, bins1, p1 = hist(vals, binctrs, align='center') n2, bins2, p2 = hist(vals[:300], binctrs, align='center') setp(p1, 'facecolor', 'k', 'alpha', 0.2) setp(p2, 'facecolor', 'g', 'alpha', 0.9) legend((p1, p2), ("Frobs", "NewFrobs")) show() ------------------------------ Thanks, Scott -- Scott M. Ransom Address: NRAO Phone: (434) 296-0320 520 Edgemont Rd. email: sr...@nr... Charlottesville, VA 22903 USA GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989