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: Benjamin R. <ben...@ou...> - 2011-07-20 17:29:19
|
On Wed, Jul 20, 2011 at 12:15 PM, Pete Shepard <pet...@gm...>wrote: > Hello List, > > I am trying to use the pylab.contourf(X,Y,Z,100) function but I would like > to mplot a 1 dimensional heatmap instead of a 2 dimensional heatmap, Perhaps > "contourf" is not the solution but I do like these plots. > > Any suggestions? > > TIA > > An example image of what you would like to see might be useful. Ben Root |
|
From: Pete S. <pet...@gm...> - 2011-07-20 17:15:57
|
Hello List, I am trying to use the pylab.contourf(X,Y,Z,100) function but I would like to mplot a 1 dimensional heatmap instead of a 2 dimensional heatmap, Perhaps "contourf" is not the solution but I do like these plots. Any suggestions? TIA |
|
From: Jae-Joon L. <lee...@gm...> - 2011-07-20 13:10:54
|
There could be a few ways. What I recommend as a matter of fact is to
use other method to draw gridlines. On the other hand, given that you
have a working example, it could be better to have different axis to
draw ticklabels in locations where you want. Here is a diff.
Regards,
-JJ
*** qqwee2.py 2011-07-20 22:02:37.973960916 +0900
--- qqwee.py 2011-07-20 22:04:46.063960883 +0900
***************
*** 36,41 ****
--- 36,60 ----
ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
fig.add_subplot(ax1)
+ grid_locator1 = FixedLocator([j-0.5*pi for j in theta[::10]])
+ grid_locator2 = FixedLocator([i for i in rad[::5]])
+
+ grid_helper2 = floating_axes.GridHelperCurveLinear(tr,
+ extremes=(.5*pi-0.17,
-.5*pi+0.17, 120, 1),
+ grid_locator1=grid_locator1,
+ grid_locator2=grid_locator2,
+ tick_formatter1=None,
+ tick_formatter2=None,
+ )
+
+ ax1.axis["left2"] = grid_helper2.new_fixed_axis("left", axes=ax1)
+ ax1.axis["left2"].line.set_visible(False)
+ ax1.axis["left2"].toggle(ticks=False)
+
+ ax1.axis["bottom2"] = grid_helper2.new_fixed_axis("bottom", axes=ax1)
+ ax1.axis["bottom2"].line.set_visible(False)
+ ax1.axis["bottom2"].toggle(ticks=False)
+
# create a parasite axes whose transData in RA, cz
aux_ax = ax1.get_aux_axes(tr)
On Tue, Jul 12, 2011 at 2:12 AM, bhargav vaidya <coo...@gm...> wrote:
> Hello all,
>
> I need help to have customize tick labels using axis artist.
> My problem is to create a grid representation in polar co-ordinates (see fig) with r = logspace(log(1),log(120),128)
> and theta = linspace(0.17,2.97,64) # in radians
>
> I managed to to create the proper gridlines. But unfortunately I have to remove the tick labels as the way I describe the grid locator they crowd the axis.
> I would like to choose only certain points on the axis and label them as the plot would look nice.
>
>
> Regards
> Bhargav Vaidya.
>
> Here is my code modified to my need from already existing code found in the web :
>
> from matplotlib.transforms import Affine2D
> import mpl_toolkits.axisartist.floating_axes as floating_axes
>
> import numpy as np
> import mpl_toolkits.axisartist.angle_helper as angle_helper
> from matplotlib.projections import PolarAxes
> from mpl_toolkits.axisartist.grid_finder import FixedLocator, MaxNLocator, \
> DictFormatter
>
> def setup_axes2(fig, rect):
>
> tr = PolarAxes.PolarTransform()
>
> pi = np.pi
> rad = np.logspace(np.log(1.),np.log(120.),128) # Radial
> theta = np.linspace(0.17,2.97,64) # Theta Co-ordinates
> angle_ticks = [(0, r"$\frac{1}{2}\pi$"),
> (.25*pi, r"$\frac{1}{4}\pi$"),
> (.5*pi, r"$0$"),
> (-.25*pi, r"$\frac{3}{4}\pi$"),
> (-0.5*pi, r"$\pi$")]
> grid_locator1 = FixedLocator([j-0.5*pi for j in theta])
> #grid_locator1 = FixedLocator([v for v, s in angle_ticks])
>
>
> grid_locator2 = FixedLocator([i for i in rad])
>
> grid_helper = floating_axes.GridHelperCurveLinear(tr,
> extremes=(.5*pi-0.17, -.5*pi+0.17, 120, 1),
> grid_locator1=grid_locator1,
> grid_locator2=grid_locator2,
> tick_formatter1=None,
> tick_formatter2=None,
> )
>
> ax1 = floating_axes.FloatingSubplot(fig, rect, grid_helper=grid_helper)
> fig.add_subplot(ax1)
>
> # create a parasite axes whose transData in RA, cz
> aux_ax = ax1.get_aux_axes(tr)
>
> aux_ax.patch = ax1.patch # for aux_ax to have a clip path as in ax
> ax1.patch.zorder=0.9 # but this has a side effect that the patch is
> # drawn twice, and possibly over some other
> # artists. So, we decrease the zorder a bit to
> # prevent this.
>
> return ax1, aux_ax
> if 1:
> import matplotlib.ticker as mpltick
> import matplotlib.pyplot as plt
> fig = plt.figure(1, figsize=(10, 10))
>
>
> ax2, aux_ax2 = setup_axes2(fig, 111)
>
>
> ax2.axis["left"].major_ticklabels.set_visible(False)
> ax2.axis["bottom"].major_ticklabels.set_visible(False)
>
> ax2.grid(color='k',linestyle='-',linewidth=0.5)
>
> plt.show()
>
> Here is the eps file
>
>
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Gerald S. <gd...@mr...> - 2011-07-20 08:19:02
|
Have a closer look at the example I gave. The currently released version of matplotlib doesn't support PySide at all. So I cheated and simply drew to the generic Agg backend and then copied the whole figure (gcf = get current figure) into a PySide QImage object at the end. The QImage can then be displayed however you want inside your Qt application. I used a QGraphicsScene but there are other options. If you really wanted to I guess you could use FigureCanvasAgg as an intermediary - but the process is fundamentally different. You can't just drop that it into your PySide app as a widget like you can with FigureCanvasQTAgg. As mentioned earlier, if you'd like to use the same code simply wait for the next release of matplotlib which will support PySide or you can get a copy of the source from github master today that also support PySide. Gerald. On 20/07/2011 3:59 PM, lionel chiron wrote: > Hi Gerald, > > I found yesterday interesting informations on a forum where you > answered about Matplotlib and pyside .. but some details are missing > to make what I want. > Few days ago I developped stuff in PyQt I 'd like to recuperate in > Pyside.. the central difficulty is to import Matplotlib in Pyside. > In PyQt I was using FigureCanvasQTAgg but in Pyside I couldn't find > something equivalent allowing to link Mpl and pyside.. > It seems you're able to make drawings (with add.patch) but how to do > for inserting a figure? > > Thanks > > Best > > Lionel |
|
From: Benjamin R. <ben...@ou...> - 2011-07-20 03:32:08
|
On Tue, Jul 19, 2011 at 10:22 PM, gary ruben <gr...@bi...> wrote: > Thanks Ben, that works nicely. Good work :) (except that inkscape is > not nearly as good as matplotlib itself at optimising the resulting > vector-based pdf to keep the file size down - not mpl's fault though). > I just remembered, while trying this out, that there are two of every > object forming the axis parts - two of every patch, grid line, tick > line and label. It was this way before the latest changes also, but is > there a reason, or is it a bug? It doesn't impact visually though. > > thanks for the great work on this, > Gary > > Glad that helped. I haven't noticed the doubling issue, but I have my suspicions. It is likely an inadvertent side-effect of the current design. I will look out for that, but I am hopeful that this will resolve itself as I continue to refactor mplot3d. If the problem hasn't resolved itself before the next+1 release (i.e., whatever will come after v1.1.0), then ping me again for a reminder. Cheers, Ben Root |
|
From: gary r. <gr...@bi...> - 2011-07-20 03:23:17
|
Thanks Ben, that works nicely. Good work :) (except that inkscape is not nearly as good as matplotlib itself at optimising the resulting vector-based pdf to keep the file size down - not mpl's fault though). I just remembered, while trying this out, that there are two of every object forming the axis parts - two of every patch, grid line, tick line and label. It was this way before the latest changes also, but is there a reason, or is it a bug? It doesn't impact visually though. thanks for the great work on this, Gary On Wed, Jul 20, 2011 at 12:41 PM, Benjamin Root <ben...@ou...> wrote: > On Tue, Jul 19, 2011 at 9:25 PM, gary ruben <gr...@bi...> wrote: >> >> I haven't had a chance to look properly at the new mplot3d >> improvements that Ben Root has been working on, but I wonder whether >> it is easy now to set the axis properties so that the patches that >> form the axes no longer have an alpha value of 0.5? I really want them >> to be solid. The use case is that I often save images in a vector >> format for editing within inkscape, do some fiddling, then re-export >> as eps or pdf. If there are any semi-transparent objects, inkscape >> will rasterize the whole image, so it becomes necessary to first go >> through and manually set the alphas of all these patches to 1.0 before >> saving. >> A cursory look at the new code makes me hopeful that this is now >> possible since the setting from _AXINFO has been moved to the Axis >> constructor. Does that mean I'll be able to do something like >> ax._axinfo['x']['color']=(0.3,0.3,0.3,1) with the new version? >> >> Gary >> > > Gary, > > Glad to hear that you are kicking the tires. To make it clear, the _axinfo > dictionary is in the Axis3D object (of which there are 3 in a Axes3D > object). So, it would be something like: > > ax.xaxis._axinfo['color'] = (0.3, 0.3, 0.3, 1) > > At least, in theory. Part of the reason why I did not want to make this > dictionary official is because the above would not actually work as > expected. Although something similar for tick line colors might, for > example. Because of the inconsistencies and because I did not want to paint > myself into a corner, I have made this dictionary explicitly "users beware". > > However, there is hope for your problem! Use ax.xaxis.set_pane_color((0.3, > 0.3, 0.3, 1)) instead! > > Let me know if you encounter any other problems. > Ben Root > > |
|
From: Benjamin R. <ben...@ou...> - 2011-07-20 02:41:35
|
On Tue, Jul 19, 2011 at 9:25 PM, gary ruben <gr...@bi...> wrote: > I haven't had a chance to look properly at the new mplot3d > improvements that Ben Root has been working on, but I wonder whether > it is easy now to set the axis properties so that the patches that > form the axes no longer have an alpha value of 0.5? I really want them > to be solid. The use case is that I often save images in a vector > format for editing within inkscape, do some fiddling, then re-export > as eps or pdf. If there are any semi-transparent objects, inkscape > will rasterize the whole image, so it becomes necessary to first go > through and manually set the alphas of all these patches to 1.0 before > saving. > A cursory look at the new code makes me hopeful that this is now > possible since the setting from _AXINFO has been moved to the Axis > constructor. Does that mean I'll be able to do something like > ax._axinfo['x']['color']=(0.3,0.3,0.3,1) with the new version? > > Gary > > Gary, Glad to hear that you are kicking the tires. To make it clear, the _axinfo dictionary is in the Axis3D object (of which there are 3 in a Axes3D object). So, it would be something like: ax.xaxis._axinfo['color'] = (0.3, 0.3, 0.3, 1) At least, in theory. Part of the reason why I did not want to make this dictionary official is because the above would not actually work as expected. Although something similar for tick line colors might, for example. Because of the inconsistencies and because I did not want to paint myself into a corner, I have made this dictionary explicitly "users beware". However, there is hope for your problem! Use ax.xaxis.set_pane_color((0.3, 0.3, 0.3, 1)) instead! Let me know if you encounter any other problems. Ben Root |
|
From: gary r. <gr...@bi...> - 2011-07-20 02:26:07
|
I haven't had a chance to look properly at the new mplot3d improvements that Ben Root has been working on, but I wonder whether it is easy now to set the axis properties so that the patches that form the axes no longer have an alpha value of 0.5? I really want them to be solid. The use case is that I often save images in a vector format for editing within inkscape, do some fiddling, then re-export as eps or pdf. If there are any semi-transparent objects, inkscape will rasterize the whole image, so it becomes necessary to first go through and manually set the alphas of all these patches to 1.0 before saving. A cursory look at the new code makes me hopeful that this is now possible since the setting from _AXINFO has been moved to the Axis constructor. Does that mean I'll be able to do something like ax._axinfo['x']['color']=(0.3,0.3,0.3,1) with the new version? Gary |
|
From: Benjamin R. <ben...@ou...> - 2011-07-19 16:31:21
|
On Tue, Jul 19, 2011 at 9:14 AM, Jakub Nowacki <j.s...@gm...>wrote: > Thanks for the answers. > > >> Jakub, if possible, could you test out the latest matplotlib in >> development on github? I have been working hard in this. If not, you >> could also always operate directly through the axis objects >> themselves, such as: ax.zaxis (although, you might have to do >> ax.w_zaxis). >> > > OK, I can use axis through w_*axis to control them. The function set_ticks > works(ish) in that case but the axes is for some reason flushed to the left > (it filled the image before) as can be seen in the enclosed image. This > behaviour has nothing to do with the ticks values nor the axis (brakes the > same for x, y and z axis). The selected ticks are updated though, just the > whole projection (?) brakes. > > Curious, I haven't encountered that before. Is it possible to include a code sample that reproduces the problem for you? > The below suggestion by José works correctly without the effect shown in > the image. > > > a1.w_yaxis.set_major_locator(**LinearLocator(5)) > a1.w_zaxis.set_major_locator(**LinearLocator(5)) > > As for the github version, I can try it out in some future but currently I > don't have time. Also installing new stuff into EPD is not necessary too > trivial. > > Fair enough. I am glad you found a solution that works for you. Ben Root |
|
From: Jakub N. <j.s...@gm...> - 2011-07-19 14:14:13
|
Thanks for the answers. > > Jakub, if possible, could you test out the latest matplotlib in > development on github? I have been working hard in this. If not, you > could also always operate directly through the axis objects > themselves, such as: ax.zaxis (although, you might have to do > ax.w_zaxis). OK, I can use axis through w_*axis to control them. The function set_ticks works(ish) in that case but the axes is for some reason flushed to the left (it filled the image before) as can be seen in the enclosed image. This behaviour has nothing to do with the ticks values nor the axis (brakes the same for x, y and z axis). The selected ticks are updated though, just the whole projection (?) brakes. The below suggestion by José works correctly without the effect shown in the image. a1.w_yaxis.set_major_locator(LinearLocator(5)) a1.w_zaxis.set_major_locator(LinearLocator(5)) As for the github version, I can try it out in some future but currently I don't have time. Also installing new stuff into EPD is not necessary too trivial. Thanks for the suggestions. Cheers, Jakub |
|
From: Benjamin R. <ben...@ou...> - 2011-07-19 14:13:22
|
On Tuesday, July 19, 2011, José Alexandre Nalon <na...@te...> wrote: > Hello, > > Em 19/07/2011, às 08:09, Jakub Nowacki escreveu: > >> But I've found that _nbins doesn't do >> anything (also, there is no zaxis object), set_zticks return an error >> 'AttributeError: 'Axes3DSubplot' object has no attribute 'set_zticks'' >> and set_x(y)ticks changes ticks of not 3d axis but 2d one. Is there any >> (other) way to influence the number of ticks? > > I don't know if that will help you, but I used the command below: > > a1.w_yaxis.set_major_locator(LinearLocator(5)) > a1.w_zaxis.set_major_locator(LinearLocator(5)) > > Notice that you are not using xaxis, yaxis or zaxis, these properties > do not exist and give you the attribute error you are getting. But, > adding w_ in front of the name of the axis it works perfectly. You > can use locators and formatters in this way. > > Also, notice that if you want to control axis limits, you should use > set_xlim3d, set_ylim3d and set_zlim3d. While these commands are a > little more cumbersome to use, I could get a lot of control over 3d > plots using them. > > Hope this helps! > Just a heads-up, this will no longer be necessary in the upcoming v1.1.0 release. They will still be valid, but not required. Ben Root |
|
From: José A. N. <na...@te...> - 2011-07-19 13:58:19
|
Hello, Em 19/07/2011, às 08:09, Jakub Nowacki escreveu: > But I've found that _nbins doesn't do > anything (also, there is no zaxis object), set_zticks return an error > 'AttributeError: 'Axes3DSubplot' object has no attribute 'set_zticks'' > and set_x(y)ticks changes ticks of not 3d axis but 2d one. Is there any > (other) way to influence the number of ticks? I don't know if that will help you, but I used the command below: a1.w_yaxis.set_major_locator(LinearLocator(5)) a1.w_zaxis.set_major_locator(LinearLocator(5)) Notice that you are not using xaxis, yaxis or zaxis, these properties do not exist and give you the attribute error you are getting. But, adding w_ in front of the name of the axis it works perfectly. You can use locators and formatters in this way. Also, notice that if you want to control axis limits, you should use set_xlim3d, set_ylim3d and set_zlim3d. While these commands are a little more cumbersome to use, I could get a lot of control over 3d plots using them. Hope this helps! --- José Alexandre Nalon na...@te... |
|
From: Benjamin R. <ben...@ou...> - 2011-07-19 13:27:33
|
On Tuesday, July 19, 2011, Jakub Nowacki <j.s...@gm...> wrote: > Dear All, > > I've found it impossible to get some control over ticks in a 3D plot > (Axes3D, using with projection='3d' option) in Matplotlib 1.0.1 (EPD > 7.1-1 linux 64-bit). Namely, I have one out of four subplots, that is 3D > and it has much to many ticks (tick labels to be exact), which makes > them unreadable (most of them overlay on one another, not mentioning > axis labels are covered as well). Usually in such situations I used > set_x(y)ticks with some values or ax.x(y)axis.get_major_locator()._nbins > if I just wanted a certain number. But I've found that _nbins doesn't do > anything (also, there is no zaxis object), set_zticks return an error > 'AttributeError: 'Axes3DSubplot' object has no attribute 'set_zticks'' > and set_x(y)ticks changes ticks of not 3d axis but 2d one. Is there any > (other) way to influence the number of ticks? > > Thanks for the help in advance. > > Best wishes, > > Jakub > Jakub, if possible, could you test out the latest matplotlib in development on github? I have been working hard in this. If not, you could also always operate directly through the axis objects themselves, such as: ax.zaxis (although, you might have to do ax.w_zaxis). Ben Root |
|
From: Jakub N. <j.s...@gm...> - 2011-07-19 11:09:29
|
Dear All, I've found it impossible to get some control over ticks in a 3D plot (Axes3D, using with projection='3d' option) in Matplotlib 1.0.1 (EPD 7.1-1 linux 64-bit). Namely, I have one out of four subplots, that is 3D and it has much to many ticks (tick labels to be exact), which makes them unreadable (most of them overlay on one another, not mentioning axis labels are covered as well). Usually in such situations I used set_x(y)ticks with some values or ax.x(y)axis.get_major_locator()._nbins if I just wanted a certain number. But I've found that _nbins doesn't do anything (also, there is no zaxis object), set_zticks return an error 'AttributeError: 'Axes3DSubplot' object has no attribute 'set_zticks'' and set_x(y)ticks changes ticks of not 3d axis but 2d one. Is there any (other) way to influence the number of ticks? Thanks for the help in advance. Best wishes, Jakub |
|
From: Tony Yu <ts...@gm...> - 2011-07-18 21:58:58
|
When using the Qt4 backend, I'm getting an IOError similar to the one detailed in: http://old.nabble.com/matplotlib-with-Qt4-backend-td26311369.html But it's definitely a separate issue (see Traceback below). This issue also seems specific to Qt (I couldn't reproduce it on 'macosx', 'tkagg', or 'agg' backends). I found a number of other people who ran into similar problems with Qt. Their solutions tend to be: catch the error and just try running the process again. I'm on Qt 4.7.3, OS X 10.6.8, Matplotlib trunk. Any help would be much appreciated. -Tony Script reproducing issue ======================== import matplotlib matplotlib.use('qt4agg') import matplotlib.pyplot as plt for n in xrange(300): plt.plot([0, 1]) plt.savefig('test.jpg') # Since it's a signaling issue, it gets triggered randomly, so the attached # script may or not reproduce the issue. Traceback ========= traceback (most recent call last): File "qterror.py", line 8, in <module> plt.savefig('test.jpg') File "/Users/Tony/python/devel/mpl/lib/matplotlib/pyplot.py", line 428, in savefig return fig.savefig(*args, **kwargs) File "/Users/Tony/python/devel/mpl/lib/matplotlib/figure.py", line 1162, in savefig self.canvas.print_figure(*args, **kwargs) File "/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_qt4agg.py", line 153, in print_figure FigureCanvasAgg.print_figure(self, *args, **kwargs) File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line 1979, in print_figure **kwargs) File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line 1799, in print_jpg buf, size = agg.print_to_buffer() File "/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line 45 7, in print_to_buffer FigureCanvasAgg.draw(self) File "/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line 40 0, in draw self.renderer = self.get_renderer() File "/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line 41 1, in get_renderer self.renderer = RendererAgg(w, h, self.figure.dpi) File "/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_agg.py", line 51 , in __init__ RendererBase.__init__(self) File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line 114, in _ _init__ self._text2path = textpath.TextToPath() File "/Users/Tony/python/devel/mpl/lib/matplotlib/textpath.py", line 37, in __init_ _ self._adobe_standard_encoding = self._get_adobe_standard_encoding() File "/Users/Tony/python/devel/mpl/lib/matplotlib/textpath.py", line 41, in _get_ad obe_standard_encoding enc_name = dviread.find_tex_file('8a.enc') File "/Users/Tony/python/devel/mpl/lib/matplotlib/dviread.py", line 837, in find_te x_file result = pipe.communicate()[0].rstrip() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subpro cess.py", line 663, in communicate stdout = self.stdout.read() IOError: [Errno 4] Interrupted system call |
|
From: Michael D. <md...@st...> - 2011-07-18 20:06:26
|
Thanks for the report. I have created a pull request with a solution for this bug here: https://github.com/matplotlib/matplotlib/pull/403 If you are able to build from git, test these changes and give me feedback in your specific environment, that would be great. Cheers, Mike On 07/14/2011 04:59 PM, Christopher Brown wrote: > 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() > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
|
From: C M <cmp...@gm...> - 2011-07-18 19:29:59
|
On Mon, Jul 18, 2011 at 10:58 AM, Daniel Mader
<dan...@go...> wrote:
> Hi,
>
> why don't you just parse the returned string?
>
> asdf = '3:04:02.994000'
> asdf = asdf.split(':')
> temp = asdf[-1].split('.')
> print asdf
> asdf.pop(-1)
> print asdf
> asdf.extend(temp)
> print asdf
> asdf = [int(i) for i in asdf]
> print asdf
> hrs,mins,secs,usecs = asdf
>
> That should work, and you can always transform this into some common
> unit, e.g. seconds etc.
Thanks. The issue, though is that I don't want to display a graph
with seconds, but with whatever units is most suitable, since my data
is going to range from seconds to hours. If most datapoints are
hours, I don't want things expressed in terms of "5000 seconds".
I thought there might be a way to use a DateLocator or DateFormatter
with this kind of data so that it could pick the most suitable units
based on a standardized time duration string.
So do people think I have to create my own custom locator or formatter
to do this?
Thanks,
Che
|
|
From: Rodobaca <dig...@gm...> - 2011-07-18 15:18:06
|
Hi everyone I needed some help to make my output subplot made with the code below, become something like this: http://old.nabble.com/file/p32084025/Concentracao%2BFiltradoHbO%252CHbR%252CHbT%2BApneia_01.gif The code i used to this is here, tried to comment it alot, if u dont get something, just ask.. Thanks alot for the help.... (the figure was hand-made, cept the plots).. Heres the code: def pltcanal(b, self): ##b=Matrix of dimensions (len(t),c) to plot x t t=d1.t idx1=0 c = len(find( self.ml[:,3]==1 ))#just something from my code to make sure we have the lenght of the matrix from scipy.stats import scoreatpercentile#To adjust the scales ymin1 = median(scoreatpercentile(d1.DOD[:,:27],0.05)) ymin2 = median(scoreatpercentile(d1.DOD[:,27:],0.05)) ymax1 = median(scoreatpercentile(d1.DOD[:,:27],99.95)) ymax2 = median(scoreatpercentile(d1.DOD[:,27:],99.95)) for idx1 in range(c):#making the subplots idx2=c+idx1 subplot(c,2,2*idx1+1) plt.plot(t,b[:,idx1],color='g') ylim(ymin1,ymax1) frame1 = plt.gca() for xlabel_i in frame1.axes.get_xticklabels():#To remove the scales xlabel_i.set_visible(False) xlabel_i.set_fontsize(0.0) for xlabel_i in frame1.axes.get_yticklabels(): xlabel_i.set_fontsize(0.0) xlabel_i.set_visible(False) subplot(c,2,2*idx1+2) plt.plot(t,b[:,idx2], color='r') ylim(ymin2,ymax2) frame1 = plt.gca() for xlabel_i in frame1.axes.get_xticklabels(): xlabel_i.set_visible(False) xlabel_i.set_fontsize(0.0) for xlabel_i in frame1.axes.get_yticklabels(): xlabel_i.set_fontsize(0.0) xlabel_i.set_visible(False) -- View this message in context: http://old.nabble.com/Plotting-Scales-and-Tittles-on-Subplots-with-matplotlib-tp32084025p32084025.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Daniel M. <dan...@go...> - 2011-07-18 14:59:00
|
Hi,
why don't you just parse the returned string?
asdf = '3:04:02.994000'
asdf = asdf.split(':')
temp = asdf[-1].split('.')
print asdf
asdf.pop(-1)
print asdf
asdf.extend(temp)
print asdf
asdf = [int(i) for i in asdf]
print asdf
hrs,mins,secs,usecs = asdf
That should work, and you can always transform this into some common
unit, e.g. seconds etc.
Hope it helps,
Daniel
2011/7/17 C M <cmp...@gm...>:
> This a time duration in my database: '3:04:02.994000' (i.e., 3 hrs, 4
> min, 2 sec and 994 microsec). It's a string.
>
> Is there a way to allow Matplotlib to interpret that directly as a
> duration of time?
>
> Thank you.
|
|
From: r-w <rzz...@gm...> - 2011-07-18 08:01:42
|
On 07/18/2011 01:03 PM, Eric Firing wrote: > On 07/17/2011 03:47 PM, r-w wrote: >> > I have been able to embed a matplotlib simple line graph into a wxpython >> > application and then dynamically update the underlying line data. >> > >> > However, I now want to do something similar with an errorbar plot. I see >> > that the errorbar() call returns (/plotline/,/caplines/,/barlinecols/) >> > where 'plotline' describes the line part of the plot and the 'caplines' >> > and 'barlinecols' describe the error bars and use the Path object. >> > >> > I just can't see how to change the values underlying the errorbars. I >> > need to change the x and y values as well as the yerr values. >> > >> > Anybody have any idea how to do this? Or should I look at other >> > approaches, such a simple line graph and a patch that draws error bars >> > 'by hand'? > If you need to update everything, then you probably can't do much better > than to simply clear the axes and call the errorbar method each time you > need to update. That is certainly the easy way--you might as well try > it first. > > Eric > Thanks for the tip Eric. It would work but I probably don't want to go that way as the application I'm working on will have up to 25 line plots as well as other adornments. But your suggestion lead me to another approach - put errorbars on a graph as a patch and remove the patch and create a new patch whenever the errorbar data changes. I got most of the patch code from the tutorial: http://matplotlib.sourceforge.net/users/path_tutorial.html A working example is at: http://pastebin.com/KMzzFTCi Not sure if the above approach will work in my 'production' widget, but I'm on my way! Thanks, Ross |
|
From: Eric F. <ef...@ha...> - 2011-07-18 03:03:31
|
On 07/17/2011 03:47 PM, r-w wrote: > I have been able to embed a matplotlib simple line graph into a wxpython > application and then dynamically update the underlying line data. > > However, I now want to do something similar with an errorbar plot. I see > that the errorbar() call returns (/plotline/, /caplines/, /barlinecols/) > where 'plotline' describes the line part of the plot and the 'caplines' > and 'barlinecols' describe the error bars and use the Path object. > > I just can't see how to change the values underlying the errorbars. I > need to change the x and y values as well as the yerr values. > > Anybody have any idea how to do this? Or should I look at other > approaches, such a simple line graph and a patch that draws error bars > 'by hand'? If you need to update everything, then you probably can't do much better than to simply clear the axes and call the errorbar method each time you need to update. That is certainly the easy way--you might as well try it first. Eric > > Thanks, > Ross > |
|
From: r-w <rzz...@gm...> - 2011-07-18 01:47:36
|
I have been able to embed a matplotlib simple line graph into a wxpython application and then dynamically update the underlying line data. However, I now want to do something similar with an errorbar plot. I see that the errorbar() call returns (/plotline/, /caplines/, /barlinecols/) where 'plotline' describes the line part of the plot and the 'caplines' and 'barlinecols' describe the error bars and use the Path object. I just can't see how to change the values underlying the errorbars. I need to change the x and y values as well as the yerr values. Anybody have any idea how to do this? Or should I look at other approaches, such a simple line graph and a patch that draws error bars 'by hand'? Thanks, Ross |
|
From: C M <cmp...@gm...> - 2011-07-16 23:33:02
|
This a time duration in my database: '3:04:02.994000' (i.e., 3 hrs, 4 min, 2 sec and 994 microsec). It's a string. Is there a way to allow Matplotlib to interpret that directly as a duration of time? Thank you. |
|
From: Jeff W. <js...@fa...> - 2011-07-15 20:18:09
|
On 7/15/11 12:55 PM, Benjamin Root wrote: > On Fri, Jul 15, 2011 at 1:44 PM, Yoshi Rokuko <yo...@ro... > <mailto:yo...@ro...>> wrote: > > +--------------------------------------------- Jeff Whitaker > -----------+ > > On 7/14/11 2:25 PM, Yoshi Rokuko wrote: > > > 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. > > > > Yoshi: There is no mechanism for doing this. It is possible, > but you > > would need a way to create a mask for all the grid points > outside the > > country of interest, and then use this mask to create a masked > array to > > pass to contourf. > > > > -Jeff > > wouldn't it be possible to create such a mask using internals from > Basemap.drawcountries() somehow? > > best regards, yoshi > > > Jeff, I just had a thought.... > > Isn't the country borders drawn as Path or Polygon objects? I believe > there are some matplotlib internal functions that can be given a list > of points (such as those for a grid) and a path and it will return > which points are within the path and which are outside. One could use > that to make the mask. > > Might make for a nice feature for basemap in the upcoming v1.1.0 release. > > Ben Root > Ben/Yoshi: The countries are not polygons, they are line segments. Worse yet, they are all just lumped together with no metadata (no way to know which lines define the country you want). If you had a shapefile with just the country of interest in it, defined as a polygon, then it's doable You could take a look at the source code for the is_land method, which tests to see if a given x,y point is inside any of the continent polygons. Let us know if you have you have the country polygon, and then I can help you with the details. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Benjamin R. <ben...@ou...> - 2011-07-15 18:55:27
|
On Fri, Jul 15, 2011 at 1:44 PM, Yoshi Rokuko <yo...@ro...> wrote: > +--------------------------------------------- Jeff Whitaker -----------+ > > On 7/14/11 2:25 PM, Yoshi Rokuko wrote: > > > 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. > > > > Yoshi: There is no mechanism for doing this. It is possible, but you > > would need a way to create a mask for all the grid points outside the > > country of interest, and then use this mask to create a masked array to > > pass to contourf. > > > > -Jeff > > wouldn't it be possible to create such a mask using internals from > Basemap.drawcountries() somehow? > > best regards, yoshi > > Jeff, I just had a thought.... Isn't the country borders drawn as Path or Polygon objects? I believe there are some matplotlib internal functions that can be given a list of points (such as those for a grid) and a path and it will return which points are within the path and which are outside. One could use that to make the mask. Might make for a nice feature for basemap in the upcoming v1.1.0 release. Ben Root |