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
(10) |
2
(10) |
3
(9) |
4
(3) |
5
(2) |
6
(6) |
7
(12) |
8
(21) |
9
(4) |
10
(19) |
11
(7) |
12
(2) |
13
(28) |
14
(13) |
15
(27) |
16
(17) |
17
(21) |
18
(22) |
19
(3) |
20
(25) |
21
(17) |
22
(16) |
23
(28) |
24
(19) |
25
(4) |
26
(4) |
27
(23) |
28
(13) |
29
(15) |
30
(19) |
|
|
On Tue, Sep 28, 2010 at 10:56 PM, Philip Vetter <pv+...@ma...<pv%2Bm...@ma...> > wrote: > Hello! see below for sample code. > > (1) I find that the second subplot is shifted to the right. > This seems to happen generally with colorbar. How do I fix it? > > (2) is there a way to clear/remove selected parts of the figure? > I am using ipython for interactive figure drawing > I find clf() will erase everything, cla() will empty the square plot, > but I can't see how to clear the first subfigure or the colorbar. > This would be useful as any changes to the colorbar create a new one. > (uncomment the second cbar line to see this) > > (3) is it possible to modify the orientation of cbar once drawn? > cbar.orientation ='horizontal' > plt.draw() > plt.show() > leaves it unchanged. > > Thank you for your help! > > ================ Here is my code: ================== > > #!/usr/bin/env python > import matplotlib.pyplot as plt > import numpy as np > from time import sleep > x = np.arange(0, 10, 0.2) > y = np.sin(x) > fig = plt.figure() > ax1 = fig.add_subplot(211) > cax1 = ax1.plot(x, y) > ax2 = fig.add_subplot(212) > A = np.random.random_integers(0, 10, 100).reshape(10, 10) > cax2 = ax2.imshow(A, interpolation="nearest",vmin=-1,vmax=11 ) > cbar = fig.colorbar(cax2) > #cbar = fig.colorbar(cax2, ticks=[0, 5, 10]) > plt.savefig('colorbartest.pdf') > > ====================================================== > -- > > Philip, Typically, when creating a colorbar, matplotlib "steals" some space from a particular axes. This is fine for single plots, but it looks atrocious when doing subplots. Instead, what you want is axes_grid1 http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/ (note, if you have a version earlier than 1.0.0, then it is called "axes_grid" and it is a little bit different) With this, you can specify a bunch of layout options ahead of time and get an object with all of the axes you need. In particular, I think you want to look at http://matplotlib.sourceforge.net/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.py A quick note to clear up typical confusion in that demo... You can still use subplots and embed an AxesGrid within a subplot region (although, I find this unnecessary). For this reason, the linked demo has three subplots in a single figure, and each of those subplots have four subplots. Therefore, when creating each AxesGrid, one needs to specify the subplot coordinates such as 131, 132, 133, but you can simply use 111 if you want AxesGrid to handle all of your subplotting. To address one of your other questions, you can easily specify the orientation of your colorbar to be horizontal or vertical. I hope that helps! Ben Root
This is interesting. It seems that the event.x, event.y values are for the entire figure area rather than limited to the image. Anyone know how to get the image values instead? Also, I wonder how one might get the values of the pixels (i.e. image value) at the pixels that you click on. One more thing -- is there a way to make the cursor be a full plot window cross -- graphically like: ------------------ | | | | | | | | | |--------|---------| | | | | | | ------------------ It makes it easier to align with the axes sometimes (the IDL astronomy library has a routine called rdplot that does this). Jon
On Wed, Sep 29, 2010 at 8:50 AM, Alexander Dietz <Ale...@go...> wrote: > print ax.transData.transform((10.0, 20.0)) > [ 576. 432.] Why do you say it's wrong? Note that in mpl, (0,0) is (bottom left), not (upper,left). So this is saying that the yellow dot at 10,20 (data coords) is 576 pixels up from the bottom and 432 pixels over from the left. JDH
On Wed, Sep 29, 2010 at 4:44 AM, Alexander Dietz <ale...@go...> wrote: > I would like to know how to find out the extend of the actual image in a > plot, in units of pixels. > As example I have attached a plot which is essentially empty. The lower left > corner is indicated by a red dot - what pixel position does this location > have? When opening this image in e.g. kview it is easy to find out that this > left corner of the actual plot corresponds to pixel (100,540). And so the > upper right corner (the yellow dot) is (720,60). > > But how do I find out these coordinates when generating such a plot with > matplotlib? Are there some variables of the axis or the actual plot that > contain these numbers? Take a look at the transformations tutorial. http://matplotlib.sourceforge.net/users/transforms_tutorial.html To convert from data -> pixel coordinates, use the axes transData transformation In [1]: ax = gca() In [2]: ax.transData.transform((0.5, 0.5)) Out[2]: array([ 333.125, 245. ]) You can also use mpl events to inspect the coordinates of the point under the mouse In [3]: fig = gcf() In [4]: def on_click(event): ...: print event.x, event.y ...: ...: In [5]: cid = fig.canvas.mpl_connect('button_press_event', on_click) In [6]: 188 166.0 300 227.0 384 292.0 In [7]: fig.canvas.mpl_disconnect(cid) See http://matplotlib.sourceforge.net/users/event_handling.html for more info. JDH
I'm using matplotlib 0.9, is there a best way to do this: for labeltick in ax.xaxis.get_majorticklabels() + ax.yaxis.get_majorticklabels(): labeltick.set_fontsize(15) I can't do: ax.tick_params(labelsize=15) as here: http://matplotlib.sourceforge.net/api/axes_api.html?highlight=ticklabel_format#matplotlib.axes.Axes.tick_params is it a new feature?
Hello! see below for sample code. (1) I find that the second subplot is shifted to the right. This seems to happen generally with colorbar. How do I fix it? (2) is there a way to clear/remove selected parts of the figure? I am using ipython for interactive figure drawing I find clf() will erase everything, cla() will empty the square plot, but I can't see how to clear the first subfigure or the colorbar. This would be useful as any changes to the colorbar create a new one. (uncomment the second cbar line to see this) (3) is it possible to modify the orientation of cbar once drawn? cbar.orientation ='horizontal' plt.draw() plt.show() leaves it unchanged. Thank you for your help! ================ Here is my code: ================== #!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np from time import sleep x = np.arange(0, 10, 0.2) y = np.sin(x) fig = plt.figure() ax1 = fig.add_subplot(211) cax1 = ax1.plot(x, y) ax2 = fig.add_subplot(212) A = np.random.random_integers(0, 10, 100).reshape(10, 10) cax2 = ax2.imshow(A, interpolation="nearest",vmin=-1,vmax=11 ) cbar = fig.colorbar(cax2) #cbar = fig.colorbar(cax2, ticks=[0, 5, 10]) plt.savefig('colorbartest.pdf') ====================================================== --
Hello, I am generating a bar chart following the code in this example: http://matplotlib.sourceforge.net/examples/pylab_examples/barh_demo.html. I am wondering if it is possible to have bar with a colormap (using http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html). The only piece of code I found close to this is this example: http://matplotlib.sourceforge.net/examples/api/colorbar_only.html. Thanks for your help, Sylvain.
Hello, I am generating a bar chart following the code in this example: http://matplotlib.sourceforge.net/examples/pylab_examples/barh_demo.html. I am wondering if it is possible to have bar with a colormap (using http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html). The only piece of code I found close to this is this example: http://matplotlib.sourceforge.net/examples/api/colorbar_only.html. Thanks for your help, Sylvain.
On Tue, Sep 28, 2010 at 3:05 PM, John Hunter <jd...@gm...> wrote: > On Tue, Sep 28, 2010 at 2:10 PM, Ruggero <giu...@gm...> wrote: > > > really there is no way to place the xlabel on the right as here: > > http://www.cernlove.org/blog/wp-content/uploads/2009/10/root_plot1d.png ? > > > Sorry, I misread the meaning of "and on the top for y axis". As Ben > noted, if all you want to do is move the x-alignment, you can pass > horizontalalignment to the xlabel command. > > Just to make it clear for anyone coming across this thread, horizontalalignment alone won't do it. 'ha' only specifies the alignment relative to the text coordinate point, which is 0.5 by default for axis labels. It is by specifying the x (for xlabel) or the y (for ylabel) that will actually move the axis label in any usable fashion. Ben Root
On Tue, Sep 28, 2010 at 2:10 PM, Ruggero <giu...@gm...> wrote: > really there is no way to place the xlabel on the right as here: > http://www.cernlove.org/blog/wp-content/uploads/2009/10/root_plot1d.png ? Sorry, I misread the meaning of "and on the top for y axis". As Ben noted, if all you want to do is move the x-alignment, you can pass horizontalalignment to the xlabel command.
On Tue, Sep 28, 2010 at 2:10 PM, Ruggero <giu...@gm...> wrote: > 2010年9月28日 John Hunter <jd...@gm...>: > > On Tue, Sep 28, 2010 at 10:04 AM, Ruggero <giu...@gm...> wrote: > >> As in the title: usually axis label on the x axis is plottet in the > >> middle of the axis. How to move it on the right? (and on the top for y > >> axis) > > > > You cannot coerce the xlabel to the top because it's y position is > > determined at drawtime to avoid overlapping the tick labels. But you > > can place an arbitrary piece of text up there > > > > text(1.0, 1.02, 'testing', horizontalalignment='right', > > verticalalignment='bottom', fontsize=14) > > > > See also > > > > http://matplotlib.sourceforge.net/users/index_text.html > > > > and > > > > > http://matplotlib.sourceforge.net/examples/pylab_examples/alignment_test.html > > > > JDH > > > > really there is no way to place the xlabel on the right as here: > http://www.cernlove.org/blog/wp-content/uploads/2009/10/root_plot1d.png ? > > I don't want to edit the y position of x label, I want to modify the x > position of x label and the y position of y label > > Yes, there is... When calling .set_xlabel(), you can specify the x coordinate of the label (in units of percentage of the axis width) without naming the y coordinate (that will be set automatically). You might have to fiddle with the 'ha' (horizontalalignment) keyword (choices are 'center', 'left', 'right') in order to align your text relative to the coordinate you choose. ex: ax.set_xlabel('Time (s)', x=0.95, ha='right') You can do the same thing with the 'y' keyword in .set_ylabel(). Instead of 'ha', you use 'va' (verticalalignment) in that case (choices: 'top', 'bottom', 'center', 'baseline'). Maybe we should add an example into the documentation for set_xlabel() and set_ylabel()? I can see this as a reasonable enough feature for some to want to seek out. Ben Root P.S. - I just noticed that the axis label 'remembers' the keyword properties that were used in previous calls to set_?label() on that axis. In other words, if at one point I specify that the ylabel should be at y=0.25 and then in a subsequent call to set_ylabel(), I don't specify anything at all, the previous value is used rather than the default. Don't know if that is a feature or a bug, but this kind of thing would be more obvious as matplotlib becomes more interactive. At the least, it probably should be documented in some way.
2010年9月28日 John Hunter <jd...@gm...>: > On Tue, Sep 28, 2010 at 10:04 AM, Ruggero <giu...@gm...> wrote: >> As in the title: usually axis label on the x axis is plottet in the >> middle of the axis. How to move it on the right? (and on the top for y >> axis) > > You cannot coerce the xlabel to the top because it's y position is > determined at drawtime to avoid overlapping the tick labels. But you > can place an arbitrary piece of text up there > > text(1.0, 1.02, 'testing', horizontalalignment='right', > verticalalignment='bottom', fontsize=14) > > See also > > http://matplotlib.sourceforge.net/users/index_text.html > > and > > http://matplotlib.sourceforge.net/examples/pylab_examples/alignment_test.html > > JDH > really there is no way to place the xlabel on the right as here: http://www.cernlove.org/blog/wp-content/uploads/2009/10/root_plot1d.png ? I don't want to edit the y position of x label, I want to modify the x position of x label and the y position of y label
On Tue, Sep 28, 2010 at 11:29 AM, John Hunter <jd...@gm...> wrote: > On Tue, Sep 28, 2010 at 10:04 AM, Ruggero <giu...@gm...> wrote: >> As in the title: usually axis label on the x axis is plottet in the >> middle of the axis. How to move it on the right? (and on the top for y >> axis) > > You cannot coerce the xlabel to the top because it's y position is > determined at drawtime to avoid overlapping the tick labels. But you > can place an arbitrary piece of text up there > > text(1.0, 1.02, 'testing', horizontalalignment='right', > verticalalignment='bottom', fontsize=14) Oops, forgot to set the transform. That should read text(1.0, 1.02, 'testing', horizontalalignment='right', verticalalignment='bottom', fontsize=14, transform=ax.transAxes) For more on transforms and the various coordinate systems, see http://matplotlib.sourceforge.net/users/transforms_tutorial.html JDH
On Tue, Sep 28, 2010 at 10:04 AM, Ruggero <giu...@gm...> wrote: > As in the title: usually axis label on the x axis is plottet in the > middle of the axis. How to move it on the right? (and on the top for y > axis) You cannot coerce the xlabel to the top because it's y position is determined at drawtime to avoid overlapping the tick labels. But you can place an arbitrary piece of text up there text(1.0, 1.02, 'testing', horizontalalignment='right', verticalalignment='bottom', fontsize=14) See also http://matplotlib.sourceforge.net/users/index_text.html and http://matplotlib.sourceforge.net/examples/pylab_examples/alignment_test.html JDH
As in the title: usually axis label on the x axis is plottet in the middle of the axis. How to move it on the right? (and on the top for y axis)
On Tue, Sep 28, 2010 at 1:36 AM, Aman Thakral <ama...@gm...> wrote: > Hi, > > Is there a way to change the way a Pick event occurs? Instead of a mouse > click, is it possible to use a mouse hover? I'm just curious because I'm > developing a wx application and would like to have a Tooltip over various > artists. > This is not possible. However, I think what you can do is to use the mouse move event. This requires some effort from your side but should be doable. Others may have better solution though. -JJ > Thanks, > Aman > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On Sun, Sep 26, 2010 at 4:11 AM, Jouni K. Seppänen <jk...@ik...> wrote: > I'm not sure either. It seems that the two-number form of the bounding > box is meant to create a degenerate bounding box so that any kind of > location specifier ("upper right", "lower center", etc) will always hit > that exact place, but perhaps naturally that makes it difficult to move > the box around. > In the current implementation, the legend location (Legend.loc) is set in the normalized coordinate of the bbox_to_anchor (and later transformed to the "canvas coordinate" during the drawing time). On the other hand, when the legend is moved by a user, it tries to update Legend.loc from the current position of the legend in the canvas coordinate, which results in NaNs if the bbox_to_anchor has zero width and zero height. A workaround is to set the bbox_to_anchor to its default value (Axes.bbox) when this happens. While I think it is reasonable thing to do, let me know of any other opinion. A patch is attached. Unless there is no objection, I'll commit the patch soon. Regards, -JJ
On Mon, Sep 27, 2010 at 20:10, Jae-Joon Lee <lee...@gm...> wrote: > For your original script that uses axes_grid1 toolkit, you can do something like > > host.axis["left"].major_ticklabels.set_color(p1.get_color()) > par1.axis["right"].major_ticklabels.set_color(p2.get_color()) > par2.axis["right"].major_ticklabels.set_color(p3.get_color()) Cool, it worked nicely. > Note that these are only effective when you use axes_grid1 toolkit. > > Regards, > > -JJ > > On Tue, Sep 28, 2010 at 1:35 AM, Filipe Pires Alvarenga Fernandes > <oc...@gm...> wrote: >> I was wondering if there is a way to get a effect similar to this example: >> >> http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale >> >> Here The yticklabels have the same color as the label, but using host/parasite: >> >> http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html >> >> >> I tried: >> >> for tl in host.axis["right"].axis.axes.get_xticklabels(): >> tl.set_color('b') >> >> without success. >> >> Thanks, Filipe. >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >
For your original script that uses axes_grid1 toolkit, you can do something like host.axis["left"].major_ticklabels.set_color(p1.get_color()) par1.axis["right"].major_ticklabels.set_color(p2.get_color()) par2.axis["right"].major_ticklabels.set_color(p3.get_color()) Note that these are only effective when you use axes_grid1 toolkit. Regards, -JJ On Tue, Sep 28, 2010 at 1:35 AM, Filipe Pires Alvarenga Fernandes <oc...@gm...> wrote: > I was wondering if there is a way to get a effect similar to this example: > > http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale > > Here The yticklabels have the same color as the label, but using host/parasite: > > http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html > > > I tried: > > for tl in host.axis["right"].axis.axes.get_xticklabels(): > tl.set_color('b') > > without success. > > Thanks, Filipe. > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
When performing interactive plotting from a script (i.e. matplotlib.interactive(True) followed by my plotting code, no show() calls involved but sometimes draw()) I am getting plot windows that initially show a plot, but upon attempts at interaction hang and go blank. Unfortunately, I cannot reproduce this with simple examples yet, only from an application that I have been using for the past year starting with matplotlib 0.98, then 0.99.3, and now 1.0.0. Details... I am on 64-bit Windows 7 using 64-bit Python 2.7 and many 64-bit packages, including matplotlib, from http://www.lfd.uci.edu/~gohlke/pythonlibs/ Chris Gohlke's excellent site . I encounter these hanging, interactive windows in the following Python environments o 64-bit Python 2.6.5 with matplotlib 1.0.0 64-bit installer from source forge o 64-bit Python 2.7 with matplotlib 1.0.0 64-bit installer from Chris' periodic svn builds. This is my main environment. In both environments, the problem exists with the TkAgg and WxAgg backends, and it happens whether I use the basic Python shell, or the IPython 0.10 and 0.11 shells. The solution for me is to use the Qt4Agg backend. Everything works as expected using this backend. I cannot find any obvious issues in my code. Again, this application has been working with previous versions of matplotlib using the default TkAgg backend, on 32-bit Windows XP and 64-bit Windows 7 for a while now. Has anyone else experienced similar issues? There is a http://old.nabble.com/problems-with-ipython-0.10-autocompletion-and-interactive-plotting-td29312351.html#a29421228 related thread here which seems to have been dealt with by reverting to 0.99.3. Thanks, ----- Josh Hemann Statistical Advisor http://www.roguewave.com//" Rogue Wave Software jhemann at vni dizzot com -- View this message in context: http://old.nabble.com/Interactive-plotting-hangs-with-certain-backends-on-64-bit-Windows-7-tp29822071p29822071.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Mon, Sep 27, 2010 at 14:15, Aman Thakral <ama...@gm...> wrote: > I think you're looking at an old example. Have a look at this one: > > http://matplotlib.sourceforge.net/examples/pylab_examples/multiple_yaxis_with_spines.html > > Is that the desire effect? Yes, thanks. > Regards, > > Aman > > It did not though. I'm not sure why. Could someone please clarify? > > On Mon, Sep 27, 2010 at 12:35 PM, Filipe Pires Alvarenga Fernandes > <oc...@gm...> wrote: >> >> I was wondering if there is a way to get a effect similar to this example: >> >> >> http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale >> >> Here The yticklabels have the same color as the label, but using >> host/parasite: >> >> >> http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html >> >> >> I tried: >> >> for tl in host.axis["right"].axis.axes.get_xticklabels(): >> tl.set_color('b') >> >> without success. >> >> Thanks, Filipe. >> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Aman Thakral > B.Eng & Biosci, M.Eng Design >
In article <4CA...@ha...>, Eric Firing <ef...@ha...> wrote: > On 09/26/2010 09:43 PM, Fernando Perez wrote: > > Mmh, > > > > On Sun, Sep 26, 2010 at 10:56 PM, Jae-Joon > > Lee<lee...@gm...> wrote: > >> > >> Did you try autoscale_view method? > >> > >> http://matplotlib.sourceforge.net/api/axes_api.html?highlight=autoscale#mat > >> plotlib.axes.Axes.autoscale_view > >> > >> Please post a sample script that reproduces the problem. > >> > > > > I'm wondering if I'm doing something wrong then. Just now I was > > writing some notes about this for a tutorial, and tried this code: > > > > line, = plt.plot([1,2,3], label='my data') > > plt.grid() > > plt.title('My title') > > x = np.linspace(0, 1) > > y = x**2 > > line.set_data(x, y) > > ax = gca() > > ax.autoscale_view() > > plt.draw() > > > > but I get the result shown in the screenshot. Am I misusing > > autoscale_view? As best I can tell from the docstring, I'm making > > correct use of it, but perhaps I'm missing something... > > autoscale_view somewhat defeats the purpose of line.set_data, which is > intentionally minimalist. If you want autoscaling after update, but > don't want to simply clear and plot, then you need to explicitly update > the Axes.dataLim. You can do this using Axes.relim() > prior to calling autoscale_view(). Thank you. That is exactly what I needed. It looks like Axes.get_ybound() will return the min and max displayed y so whenever I add a point I can test if it is within those bounds; if it is not then I can call relim(). That should preserve the efficiency most of the time while still allowing autoscaling and avoiding my having to keep accurate track of what's going on. -- Russell
Hi, all! How to build a surface from a file? I could read data : x,y,z = loadtxt('data.txt', usecols=[0,1,2], unpack=True), but was unable to draw :-(( In a file stored vertices rectangular sites: -3.7169418696 -1.1272630211 2.3019377358 -3.8909157412 -2.0312577759 1.7469796037 -3.5817236434 -2.3326455834 1.7469796037 -3.7169418696 -1.1272630211 2.3019377358 -3.7169418696 -1.1272630211 2.3019377358 -3.5817236434 -2.3326455834 1.7469796037 -3.5453532005 -1.2945206358 2.3019377358 -3.7169418696 -1.1272630211 2.3019377358 ... Thank. -- View this message in context: http://old.nabble.com/plot3Dsurface4txtfile-tp29816972p29816972.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi, Is there a way to change the way a Pick event occurs? Instead of a mouse click, is it possible to use a mouse hover? I'm just curious because I'm developing a wx application and would like to have a Tooltip over various artists. Thanks, Aman
I was wondering if there is a way to get a effect similar to this example: http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale Here The yticklabels have the same color as the label, but using host/parasite: http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html I tried: for tl in host.axis["right"].axis.axes.get_xticklabels(): tl.set_color('b') without success. Thanks, Filipe.