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
|
|
From: ilan b. <iba...@ya...> - 2012-08-20 14:58:53
|
<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
text="#000000">
<pre wrap="">Hello
I have set rcParams['axes.color_cycle'] = ['r','Blue', 'g', 'm','c','k', 'Tomato... ] to a long list of colors.
Later in the program I have many figure() commands floowed by plot commands.
The color sequence does not repateat itself for each new figure
How do I reset the sequence?
Thanks
Ilan</pre>
</body>
</html>
|
|
From: darkside <in....@gm...> - 2012-08-20 13:50:55
|
Thank you for your help, but I have already read this link. I am using zoomed_inset_axes, but the default position overlaps the yticks and the parent axe ticks, so I am trying: axins = zoomed_inset_axes(ax, 3,bbox_to_anchor(0.5,1),bbox_transform=ax.figure.transFigure, loc=2) but it doesn't work. I have also tried: box = axins.get_position() axins.set_position([box.x0+0.5, box.y0,box.width, box.height]) and the position is changed (doing a print I check the differences), but not in the plot. I guess I am doing something wrong, but I can't tell. Any help would be really useful. Cheers! Illa 2012/8/9 Benjamin Root <ben...@ou...> > > On Wed, Aug 8, 2012 at 7:03 AM, darkside <in....@gm...>wrote: > >> >> >> ---------- Forwarded message ---------- >> From: darkside <in....@gm...> >> Date: 2012/8/2 >> Subject: Re: [Matplotlib-users] zoomed in detail box >> To: Jae-Joon Lee <lee...@gm...> >> >> >> Hi everyone! >> >> I'm also trying to do a detailed zoomed area of my plot, but I can't >> manage to put the box in the position I want, bbox_to_anchor didn't work in >> my case: >> >> axins = >> zoomed_inset_axes(ax,3,loc=2,bbox_to_anchor=(0,0,0.5,0.5),bbox_transform=ax.transAxes) >> >> This bbox_to_anchor tuple is just an example. I only want to move the >> zoomed box a little to the right, since the ticklabels overlap. >> >> Any idea? >> >> I really appreciate your help! >> >> > Is this what you are looking for? > > > http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#insetlocator > > Cheers! > Ben Root > > |
|
From: Michael D. <md...@st...> - 2012-08-20 13:13:38
|
I've filed an issue for this here: https://github.com/matplotlib/matplotlib/issues/1110 Mike On 08/19/2012 05:55 PM, Eric Firing wrote: > On 2012/08/19 10:31 AM, Christopher Graves wrote: >> Hi >> >> >> I do not think this is the expected behavior. First, run the following: >> >> >> from pylab import * >> >> plot([0,3],[0.2,0.7]) >> >> ax1 = gca() >> >> ax1.set_yscale('log') >> >> gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) >> >> #ax2 = ax1.twiny() >> >> #ax2.set_xlim(ax1.get_xlim()) >> >> show() >> >> >> You will see that the y-axis is log10rithmic and axis labels are 0.1 and >> 1 rather than 10^-1 and 10^0, due to the use of set_major_formatter(). >> >> >> Now uncomment the 2 commented lines and run it again. It seems that upon >> applying a twiny(), the set_major_formatter() action is removed and the >> y-axis is now displayed as 10^-1 and 10^0. Or more likely, the y-axis is >> "overwritten" with a new y-axis present in ax2. One can add another >> gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) before the >> show() and it works as intended. However, it seems like unexpected >> behavior to "lose" the formatting when twinning the axis to add a >> secondary x-axis. Any advice or agreement that this could be a bug? > Yes, I think this is a bug. > > Eric > >> >> Best, >> >> Chris >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Freddie W. <fr...@wi...> - 2012-08-19 22:49:05
|
Hello,
Using the Cairo backend with the following snippet:
from matplotlib.figure import Figure
from matplotlib.artist import setp
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.backends.backend_cairo import FigureCanvasCairo
import numpy as np
fig = Figure()
ax1 = fig.add_axes([0.1, 0.1, 0.8, 0.8])
x = np.arange(0, 10, 0.2)
ax1.plot(x, np.sin(x))
ax1.xaxis.set_ticklabels(['Apr', 'Jul', 'Oct', '\'12', 'Apr', 'Jul'])
setp(ax1.yaxis.get_ticklabels(), visible=False)
FigureCanvasCairo(fig).print_figure('test.png')
Results in the x-axis tick labels being significantly displaced.
Specifically, "Oct" and "'12" are positioned far closer to the axis than
either "Apr" or "Jul".
With the AGG backend all of the labels are roughly aligned to the
baseline of the font -- give or take a pixel.
I have observed this on a Gentoo and Debian system, both running 1.1.1,
albeit with different default fonts.
Although I am not completely sure it appears as if a label contains a
glyph that extends below the baseline, e.g. 'p' or 'J', that the label
is forced away from the axis.
Can anyone suggest a workaround for this (or explain where I am going
wrong)?
Regards, Freddie.
|
|
From: Phil E. <pel...@gm...> - 2012-08-19 22:20:52
|
I'm not aware of an rc param for this. The relevant github issue: https://github.com/matplotlib/matplotlib/issues/461 Regards, Phil On 19 August 2012 21:27, Christopher Graves <chr...@gm...>wrote: > Using matplotlib 1.1.1. > If one runs the following code: > > from pylab import * > > plot([19.185,19.187],[0.0009,0.0011],'b.') > > show() > > The x-axis is labelled 0.0005, 0.0010, 0.0015 etc +1.9184e1 > > This is unreadable and does not seem like a good default behavior! > > One can add > gca().xaxis.set_major_formatter(FormatStrFormatter('$%g$')) > before "show()" > to obtain an x-axis labelled 19.1845, 19.185, 19.1855, etc. > > Can one change the default label formatting behavior with a matplotlib rc? > However, I would not want to e.g. override the 10^-3, 10^-2, etc when using > log axes. > > Best regards, > Chris > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Eric F. <ef...@ha...> - 2012-08-19 21:55:17
|
On 2012/08/19 10:31 AM, Christopher Graves wrote:
> Hi
>
>
> I do not think this is the expected behavior. First, run the following:
>
>
> from pylab import *
>
> plot([0,3],[0.2,0.7])
>
> ax1 = gca()
>
> ax1.set_yscale('log')
>
> gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$'))
>
> #ax2 = ax1.twiny()
>
> #ax2.set_xlim(ax1.get_xlim())
>
> show()
>
>
> You will see that the y-axis is log10rithmic and axis labels are 0.1 and
> 1 rather than 10^-1 and 10^0, due to the use of set_major_formatter().
>
>
> Now uncomment the 2 commented lines and run it again. It seems that upon
> applying a twiny(), the set_major_formatter() action is removed and the
> y-axis is now displayed as 10^-1 and 10^0. Or more likely, the y-axis is
> "overwritten" with a new y-axis present in ax2. One can add another
> gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) before the
> show() and it works as intended. However, it seems like unexpected
> behavior to "lose" the formatting when twinning the axis to add a
> secondary x-axis. Any advice or agreement that this could be a bug?
Yes, I think this is a bug.
Eric
>
>
> Best,
>
> Chris
>
|
|
From: Christopher G. <chr...@gm...> - 2012-08-19 20:32:18
|
Hi
I do not think this is the expected behavior. First, run the following:
from pylab import *
plot([0,3],[0.2,0.7])
ax1 = gca()
ax1.set_yscale('log')
gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$'))
#ax2 = ax1.twiny()
#ax2.set_xlim(ax1.get_xlim())
show()
You will see that the y-axis is log10rithmic and axis labels are 0.1 and 1
rather than 10^-1 and 10^0, due to the use of set_major_formatter().
Now uncomment the 2 commented lines and run it again. It seems that upon
applying a twiny(), the set_major_formatter() action is removed and the
y-axis is now displayed as 10^-1 and 10^0. Or more likely, the y-axis is
"overwritten" with a new y-axis present in ax2. One can add another
gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) before the
show() and it works as intended. However, it seems like unexpected behavior
to "lose" the formatting when twinning the axis to add a secondary x-axis.
Any advice or agreement that this could be a bug?
Best,
Chris
|
|
From: Christopher G. <chr...@gm...> - 2012-08-19 20:28:10
|
Using matplotlib 1.1.1.
If one runs the following code:
from pylab import *
plot([19.185,19.187],[0.0009,0.0011],'b.')
show()
The x-axis is labelled 0.0005, 0.0010, 0.0015 etc +1.9184e1
This is unreadable and does not seem like a good default behavior!
One can add
gca().xaxis.set_major_formatter(FormatStrFormatter('$%g$'))
before "show()"
to obtain an x-axis labelled 19.1845, 19.185, 19.1855, etc.
Can one change the default label formatting behavior with a matplotlib rc?
However, I would not want to e.g. override the 10^-3, 10^-2, etc when using
log axes.
Best regards,
Chris
|
|
From: Goyo <goy...@gm...> - 2012-08-19 18:13:03
|
2012/8/19 Peter Combs <pco...@gm...>: > Hi all, > I'm trying to have a Text object with a fancy box, as in this example: > http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/fancybox_demo2.py > . However, the key difference is that I want to have the box (in my case, > I'm interested in an RArrow) be a specified width (in units of the plot), > rather than just fitting it to the text I've given (crude ascii art below). > The following seems not to work: > > > ax = gca() > txtobj = ax.text(0, -.1 * yrange, 'text', > bbox=dict(boxstyle='rarrow')) > txtobj.get_bbox_patch().set_ > width(SIZE_IM_INTERESTED_IN) > draw_if_interactive() > > It seems like draw()ing the text object will reset the size of the BBox... > Any idea how to fix this? At the moment, I'm experimenting with continually > drawing, polling the get_width() method, and when it's too small, adding in > spaces around the text field, but that seems both not to work reliably, and > be an incredibly boneheaded way to go about it. Not ideal but better: from pyplot import * subplot(111) text(0.1, 0.3, 'XXXXXXXXXXXXXXX', alpha=0, bbox=dict(boxstyle='rarrow')) text(0.1, 0.3, 'short') text(0.1, 0.6, 'XXXXXXXXXXXXXXX', alpha=0, bbox=dict(boxstyle='rarrow')) text(0.1, 0.6, 'looooooooooong') show() Goyo |
|
From: Freddie W. <fr...@wi...> - 2012-08-19 17:12:08
|
Hello,
With matplotlib 1.1.1 on Gentoo I have been observing some strange
behaviour relating to ax.legend(frameon=False) and
print_figure(bbox_inches='tight'):
from matplotlib.figure import Figure
from matplotlib.artist import setp
from matplotlib.backends.backend_cairo import FigureCanvasCairo
import numpy as np
fig = Figure()
ax1 = fig.add_axes([0.1, 0.5, 0.8, 0.4])
ax2 = fig.add_axes([0.1, 0.1, 0.8, 0.4], sharex=ax1)
x = np.arange(0, 10, 0.2)
for ax, y in zip((ax1, ax2), (np.cos(x), np.sin(x))):
ax.plot(x, y, label='A line')
ax.spines['left'].set_visible(False)
ax.yaxis.tick_right()
ax1.set_xlim((1,9))
ax1.legend(loc='upper left', frameon=False)
setp(ax1.xaxis.get_ticklabels(), visible=False)
FigureCanvasCairo(fig).print_figure('test.png', bbox_inches='tight')
On my system the resulting image has a large left margin. However, if I
change frameon to True then the left margin is cropped (as expected).
Hence setting frameon=False for a legend appears to break tight bounding
boxes.
A similar situation occurs if legend().draw_frame(False) is used to hide
the legend frame. My current work around is to use
legend().get_frame().set_visible(False) which results in the correct
bounding box.
I have also reproduced this using the AGG backend.
Regards, Freddie.
P.S. On an unrelated note are there any more performant alternatives to
bbox_inches='tight'? It almost doubles the rendering time of some more
complex plots.
|
|
From: Daniel H. <dh...@gm...> - 2012-08-19 17:07:46
|
Another, very hacky but quick way to do this, is to put spaces around your text until the arrow is the size you desire: " your text " and if you want the arrow to expand upward and downward, put in return characters (I told you it was crude ;)) On Sun, Aug 19, 2012 at 2:41 AM, Peter Combs <pco...@gm...> wrote: > Hi all, > I'm trying to have a Text object with a fancy box, as in this example: > http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/fancybox_demo2.py. However, the key difference is that I want to have the box (in my case, > I'm interested in an RArrow) be a specified width (in units of the plot), > rather than just fitting it to the text I've given (crude ascii art > below). The following seems not to work: > > > ax = gca() > txtobj = ax.text(0, -.1 * yrange, 'text', > bbox=dict(boxstyle='rarrow')) > txtobj.get_bbox_patch().set_ > width(SIZE_IM_INTERESTED_IN) > draw_if_interactive() > > It seems like draw()ing the text object will reset the size of the BBox... > Any idea how to fix this? At the moment, I'm experimenting with continually > drawing, polling the get_width() method, and when it's too small, adding in > spaces around the text field, but that seems both not to work reliably, and > be an incredibly boneheaded way to go about it. > > I'm using matplotlib v. 1.1.0 if that makes a difference. > > > --------------\ > | text > > --------------/ > not > ------\ > | text > > ------/ > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Daniel Hyams dh...@gm... |
|
From: Daniel H. <dh...@gm...> - 2012-08-19 17:05:54
|
I had to deal with this lately, and there is no current way to do what you want without patching the MPL source. I have a patch for it, but it does not behave well enough to use in the general sense....and you have target the correct code, the lack of flexibility lies in the Text._draw_bbox function. I'm afraid that you will have to create the FancyBboxPatch (the arrow) directly, size it and place it, and then create some text (with no box) to go inside. On Sun, Aug 19, 2012 at 2:41 AM, Peter Combs <pco...@gm...> wrote: > Hi all, > I'm trying to have a Text object with a fancy box, as in this example: > http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/fancybox_demo2.py. However, the key difference is that I want to have the box (in my case, > I'm interested in an RArrow) be a specified width (in units of the plot), > rather than just fitting it to the text I've given (crude ascii art > below). The following seems not to work: > > > ax = gca() > txtobj = ax.text(0, -.1 * yrange, 'text', > bbox=dict(boxstyle='rarrow')) > txtobj.get_bbox_patch().set_ > width(SIZE_IM_INTERESTED_IN) > draw_if_interactive() > > It seems like draw()ing the text object will reset the size of the BBox... > Any idea how to fix this? At the moment, I'm experimenting with continually > drawing, polling the get_width() method, and when it's too small, adding in > spaces around the text field, but that seems both not to work reliably, and > be an incredibly boneheaded way to go about it. > > I'm using matplotlib v. 1.1.0 if that makes a difference. > > > --------------\ > | text > > --------------/ > not > ------\ > | text > > ------/ > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Daniel Hyams dh...@gm... |
|
From: Goyo <goy...@gm...> - 2012-08-19 16:44:02
|
2012/8/17 mgurling <mag...@gm...>: > I've attached 2.py and 3.py which differ only in how many bars are graphed. > The "nudge" variable was intended to move the left-most bar away from > the y-axis. Better use xlim to move the y-axis away from the bar: a = [20, 35] nudge = 0.2 ind = np.arange(2) + nudge width = 0.30 bar(ind, a, width) xlim(left=0) Goyo |
|
From: Peter C. <pco...@gm...> - 2012-08-19 06:41:16
|
Hi all, I'm trying to have a Text object with a fancy box, as in this example: http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/fancybox_demo2.py. However, the key difference is that I want to have the box (in my case, I'm interested in an RArrow) be a specified width (in units of the plot), rather than just fitting it to the text I've given (crude ascii art below). The following seems not to work: ax = gca() txtobj = ax.text(0, -.1 * yrange, 'text', bbox=dict(boxstyle='rarrow')) txtobj.get_bbox_patch().set_ width(SIZE_IM_INTERESTED_IN) draw_if_interactive() It seems like draw()ing the text object will reset the size of the BBox... Any idea how to fix this? At the moment, I'm experimenting with continually drawing, polling the get_width() method, and when it's too small, adding in spaces around the text field, but that seems both not to work reliably, and be an incredibly boneheaded way to go about it. I'm using matplotlib v. 1.1.0 if that makes a difference. --------------\ | text > --------------/ not ------\ | text > ------/ |
|
From: reckoner <rec...@gm...> - 2012-08-19 03:09:37
|
Hi, I would like to plot on a monthly calendar for many months going back several years. This corresponds to the "month" view on a calendar (like in google calendar) as shown here: http://www.timeanddate.com/calendar/monthly.html Thus, I would like to have a tiled graph where every tile on the graph corresponds to a particular day in a given month that would be color-coded based on other data. The graph would include many months on the same chart. So, the entire graph would be tiled by months and then sub-tiled by days per month where each day is appropriately colored coded. Is this possible using matplotlib? Thanks! |
|
From: Timothy D. <tim...@gm...> - 2012-08-18 18:09:58
|
Thank you for the information Paul and Felix. I have followed your advice and installed a package manager, pip. However, running: sudo pip install matplotlib did not work. Instead, the key was: sudo pip install git+ https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev worked well, although I'm not sure why. For archival purposes, I have pasted my notes below for installing python / matplotlib on mac os x. Thanks again, Tim First had to install homebrew (http://mxcl.github.com/homebrew/), ran "brew doctor" and fixed the appropriate warning messages. Had to add "export PATH=/usr/local/bin:$PATH" under ~/.bash_profile. Also had to install Xcode from app store, and download "Developer Tools" under Settings-->Downloads. brew doctor brew update Then ran "brew install python", but this didnt work. So i installed gfortran instead: brew install gfortran then installed python from python.org. Because I changed the path in the .bash_profile, this version of python was "first" when I called python. ("which python" should yield /usr/local/bin/python, and "python --version" should give 2.7.2) i also used homebrew to install "pip", a python module manager, and gfortran: brew install pip brew install gfortran with pip, you can install PIL, scipy, (and nump): sudo pip install pil sudo pip install scipy sudo pip install numpy (but be sure you have gfortran before these) to get matplotlib, instead of: sudo pip install matplotlib do: sudo pip install git+ https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev this will make "ipython --pylab" work correctly Also: I had to install the 32 bit version of python-- not sure if 64/32 bit works... Doesn't matter which version you download<http://www.python.org/download/> To remove python (from here <http://docs.python.org/using/mac.html>), 1. remove /Applications/Python 2.x 2. remove the framework folder: /Library/Frameworks/Python.framework 3. you can remove the symbolic link too,... To remove matplotlib, here <http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#locating-matplotlib-install> On Fri, Aug 17, 2012 at 5:09 PM, Felix Patzelt <fe...@ne...>wrote: > The dmg you are referring to appears to install to > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages > (The main library, not the one for in our user directory). Most likely, > this directory is not in pythons search path. Therefore, python can't find > any modules installed there. To verify this, first check, whether this > directory exists. Then start ipython and enter: > from sys import path > path > > Path is a list of all paths which are searched for installed modules. If > my suspicion is correct, the directory where you installed matplotlib is > not in the list. You can just add it > > path.append('/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages') > > and then import matplotlib. However, you have add it to your path again > every time you start a new session. To add it permanently, put an otherwise > empty text file which includes the path and place it in one of the > directories that are already on the search path. You have add a .pth suffix > to this text file when you save it. > > Best, > Felix > > ps: There are many ways to install python and packages and all are more > complicated to what you are used to from the mac - welcome to the world of > unix / linux software... Still, I have been successful using either > macports (slow, but reliable) as well as distribute and pip. I recommend > macports which creates a new installation for everything you want / need in > /opt. It can also install all of the ipython optional dependencies like the > qtconsole and the notebook which cannot be done using pure python package > managers. > > Am 17.08.2012 um 23:30 schrieb Timothy Duly: > > Hi, > > I'm having trouble installing matplotlib on mac os x. I downloaded the > dmg file (matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg<http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg/download> > ) from > http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/. I was able to install this package. Beforehand, I installed python from > python.org (I read about the need to do this rather than use the shipped > python for mac os x). So, the original python is in /usr/bin/python and > the other, newer one, is in /usr/local/bin/python. > > However, after running "ipython -pylab", I get an error message: > > Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24) > Type "copyright", "credits" or "license" for more information. > > IPython 0.13 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object', use 'object??' for extra details. > [TerminalIPythonApp] GUI event loop or pylab initialization failed > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > /Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/pylabtools.pyc > in find_gui_and_backend(gui) > 194 """ > 195 > --> 196 import matplotlib > 197 > 198 if gui and gui != 'auto': > > ImportError: No module named matplotlib > > It seems that I don't have a module-- but I just installed it? > > Side note: I've read to the best of my ability this page here, > http://matplotlib.sourceforge.net/faq/installing_faq.html#os-x-notes , > but there seems to be a disconnect on this page between the actual > installation procedure. For example, no where on this page does it mention > about a *.dmg file, yet the sourceforge site has the *.dmg file. And this > help site mentions *.zip files, but this time the sourceforge download page > does not have any *.zip files! What is going on here? > > Thanks, > Tim > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
|
From: Liang W. <fra...@gm...> - 2012-08-18 05:47:34
|
Finally I was able to compile mpl with tk following this link: https://groups.google.com/forum/?fromgroups#!topic/sage-support/fV2VNL-5UuY%5B1-25%5D basically you can hack setupext.py by manually change the paths for tcl.h and tk.h if tcl.h and tk.h are missing, then you have to install them in advance On Fri, Aug 17, 2012 at 2:10 PM, Liang Wang <fra...@gm...> wrote: > Appears that I have to build my own python with tk/tcl instead of using > the default python, then rebuild mpl. What a pain. > > Like this: > > http://shanit.blogspot.com/2011/03/configuring-python-matplotlib-displays.html > > On Fri, Aug 17, 2012 at 11:51 AM, Liang Wang <fra...@gm...> wrote: > >> yes Eric, it was built without tk. But how do I specify the path to the >> tk lib and headfile? I found them but have no idea how to pass them to the >> mpl build. >> >> Already thankful for your suggestions. >> On Aug 17, 2012 11:14 AM, "Moore, Eric (NIH/NIDDK) [F]" < >> eri...@ni...> wrote: >> >>> ** ** >>> >>> ** ** >>> >>> *From:* Liang Wang [mailto:fra...@gm...] >>> *Sent:* Thursday, August 16, 2012 6:50 PM >>> *To:* Benjamin Root >>> *Cc:* mat...@li... >>> *Subject:* Re: [Matplotlib-users] Any available backend for non-root >>> users?**** >>> >>> ** ** >>> >>> Thank you Ben,**** >>> >>> I did use -X option upon ssh and I am running linux locally. The DISPLAY >>> variable is automatically "localhost:17.0", where the number 17 changes for >>> each login. But Tk would not work even after I export a new value to >>> DISPLAY like ":0.0". I even tried reinstalling matplotlib (from source or >>> through easy_install) with both values of DISPLAY but it always warns that >>> Tk window failed to open. When I try to use TkAgg, it says**** >>> >>> ** ** >>> >>> ...**** >>> >>> import matplotlib.backends.tkagg as tkagg**** >>> >>> File >>> "/ccs/home/lag69/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py", >>> line 1, in <module>**** >>> >>> import _tkagg**** >>> >>> ImportError: No module named _tkagg**** >>> >>> ** ** >>> >>> So far I haven't solved this problem and I have to generate png files to >>> view them (I can view them by xview or display of ImageMagick so the x11 >>> forwarding does work) **** >>> >>> ** ** >>> >>> This is odd, and I almost lost my patient to try. But I still want to >>> appreciate your generous help, Ben.**** >>> >>> ** ** >>> >>> regards,**** >>> >>> Liang**** >>> >>> On Thu, Aug 16, 2012 at 4:54 PM, Benjamin Root <ben...@ou...> wrote:* >>> *** >>> >>> ** ** >>> >>> On Thu, Aug 16, 2012 at 4:26 PM, Liang Wang <fra...@gm...> wrote: >>> **** >>> >>> Hi everyone. I have trouble to find a usable background on a remote >>> server where I do not have root privilege. Unfortunately, there is no >>> backend available:**** >>> >>> ** ** >>> >>> Tkinter: no**** >>> >>> * Using default library and include directories >>> for**** >>> >>> * Tcl and Tk because a Tk window failed to open. >>> **** >>> >>> * You may need to define DISPLAY for Tk to work >>> so**** >>> >>> * that setup can determine where your libraries >>> are**** >>> >>> * located. Tkinter present, but header files are >>> not**** >>> >>> * found. You may need to install development**** >>> >>> * packages.**** >>> >>> Gtk+: no**** >>> >>> * Building for Gtk+ requires pygtk; you must be >>> able**** >>> >>> * to "import gtk" in your build/install >>> environment **** >>> >>> Mac OS X native: no**** >>> >>> Qt: no**** >>> >>> Qt4: no**** >>> >>> PySide: no**** >>> >>> Cairo: no**** >>> >>> ** ** >>> >>> The output of a simple script is**** >>> >>> ==================**** >>> >>> simple_plot.py:**** >>> >>> #**** >>> >>> from pylab import ***** >>> >>> plot([1,2,3])**** >>> >>> show()**** >>> >>> #**** >>> >>> python simple_plot.py --verbose-helpful > output.txt**** >>> >>> ==================**** >>> >>> $HOME=/ccs/home/user1**** >>> >>> CONFIGDIR=/ccs/home/user1/.matplotlib**** >>> >>> matplotlib data path >>> /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data >>> **** >>> >>> loaded rc file >>> /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/matplotlibrc >>> **** >>> >>> matplotlib version 1.1.0**** >>> >>> verbose.level helpful**** >>> >>> interactive is False**** >>> >>> platform is linux2**** >>> >>> Using fontManager instance from >>> /ccs/home/user1/.matplotlib/fontList.cache**** >>> >>> backend agg version v2.2**** >>> >>> ** ** >>> >>> When I tried to install pygtk, it requires glib, which is missing, and I >>> just did not digg further. So, is there any workaround that I can get ANY >>> backend to work (to show images on screen). **** >>> >>> ** ** >>> >>> ** ** >>> >>> Any suggestions will be greatly appreciated (I really want to get things >>> to work).**** >>> >>> ** ** >>> >>> Regards,**** >>> >>> Liang**** >>> >>> ** ** >>> >>> >>> The Agg backend is always available for non-interactive plotting. In >>> other words, you won't be able to do a show() call, but you can save to any >>> of the image formats. The TkAgg backend should also be an option (unless >>> that python was built without Tk, which is rare). Often, if Tk isn't >>> working, it is a simple matter of setting your display environment >>> correctly. Most of the time, simply passing the "-X" option to ssh is >>> sufficient (assuming you are sshing from a linux box). Otherwise, I think >>> you have to mess around with your DISPLAY environment variable on the >>> remote server (I think it is usually ":0.0", but I am no expert on this. >>> >>> I hope that helps! >>> Ben Root**** >>> >>> ** ** >>> >>> ** ** >>> >>> You need to install one of the optional backends. In your original >>> email the output you included is showing “no” for all of the interactive >>> backends. So somewhere when you’re building mpl, either you don’t have the >>> right things installed or the build is unable to locate them. Tk wasn’t >>> found during the build, so no module called _tkagg was built, hence the >>> import fails as you report in your second email. Your current problem isn’t >>> with DISPLAY, but with the build. Hopefully someone else can suggest some >>> appropriate steps to take to solve you build problems, but I’d first check >>> if your python was built with Tk. **** >>> >>> ** ** >>> >>> Eric**** >>> >>> ** ** >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> > |
|
From: Felix P. <fe...@ne...> - 2012-08-17 22:09:14
|
The dmg you are referring to appears to install to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (The main library, not the one for in our user directory). Most likely, this directory is not in pythons search path. Therefore, python can't find any modules installed there. To verify this, first check, whether this directory exists. Then start ipython and enter:
from sys import path
path
Path is a list of all paths which are searched for installed modules. If my suspicion is correct, the directory where you installed matplotlib is not in the list. You can just add it
path.append('/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages')
and then import matplotlib. However, you have add it to your path again every time you start a new session. To add it permanently, put an otherwise empty text file which includes the path and place it in one of the directories that are already on the search path. You have add a .pth suffix to this text file when you save it.
Best,
Felix
ps: There are many ways to install python and packages and all are more complicated to what you are used to from the mac - welcome to the world of unix / linux software... Still, I have been successful using either macports (slow, but reliable) as well as distribute and pip. I recommend macports which creates a new installation for everything you want / need in /opt. It can also install all of the ipython optional dependencies like the qtconsole and the notebook which cannot be done using pure python package managers.
Am 17.08.2012 um 23:30 schrieb Timothy Duly:
> Hi,
>
> I'm having trouble installing matplotlib on mac os x. I downloaded the dmg file (matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg) from http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/ . I was able to install this package. Beforehand, I installed python from python.org (I read about the need to do this rather than use the shipped python for mac os x). So, the original python is in /usr/bin/python and the other, newer one, is in /usr/local/bin/python.
>
> However, after running "ipython -pylab", I get an error message:
>
> Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.13 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object', use 'object??' for extra details.
> [TerminalIPythonApp] GUI event loop or pylab initialization failed
> ---------------------------------------------------------------------------
> ImportError Traceback (most recent call last)
> /Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/pylabtools.pyc in find_gui_and_backend(gui)
> 194 """
> 195
> --> 196 import matplotlib
> 197
> 198 if gui and gui != 'auto':
>
> ImportError: No module named matplotlib
>
> It seems that I don't have a module-- but I just installed it?
>
> Side note: I've read to the best of my ability this page here, http://matplotlib.sourceforge.net/faq/installing_faq.html#os-x-notes , but there seems to be a disconnect on this page between the actual installation procedure. For example, no where on this page does it mention about a *.dmg file, yet the sourceforge site has the *.dmg file. And this help site mentions *.zip files, but this time the sourceforge download page does not have any *.zip files! What is going on here?
>
> Thanks,
> Tim
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Paul H. <pmh...@gm...> - 2012-08-17 22:05:49
|
On Fri, Aug 17, 2012 at 2:30 PM, Timothy Duly <tim...@gm...> wrote: > Hi, > > I'm having trouble installing matplotlib on mac os x. I downloaded the dmg > file (matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg) from > http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/ > . I was able to install this package. Beforehand, I installed python from > python.org (I read about the need to do this rather than use the shipped > python for mac os x). So, the original python is in /usr/bin/python and the > other, newer one, is in /usr/local/bin/python. > > However, after running "ipython -pylab", I get an error message: > > Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24) > Type "copyright", "credits" or "license" for more information. > > IPython 0.13 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object', use 'object??' for extra details. > [TerminalIPythonApp] GUI event loop or pylab initialization failed > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > /Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/pylabtools.pyc > in find_gui_and_backend(gui) > 194 """ > 195 > --> 196 import matplotlib > 197 > 198 if gui and gui != 'auto': > > ImportError: No module named matplotlib > > It seems that I don't have a module-- but I just installed it? > > Side note: I've read to the best of my ability this page here, > http://matplotlib.sourceforge.net/faq/installing_faq.html#os-x-notes , but > there seems to be a disconnect on this page between the actual installation > procedure. For example, no where on this page does it mention about a *.dmg > file, yet the sourceforge site has the *.dmg file. And this help site > mentions *.zip files, but this time the sourceforge download page does not > have any *.zip files! What is going on here? > > Thanks, > Tim I can't comment on specifics, but things to watch out for: 1) Native Mac OS X's python vs python.org's python (the latter is preferred) 2) Numpy and other dependancies Personally, I've had the best luck with the approach laid out here: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ Best of luck, -paul |
|
From: Timothy D. <tim...@gm...> - 2012-08-17 21:30:33
|
Hi, I'm having trouble installing matplotlib on mac os x. I downloaded the dmg file (matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg<http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg/download> ) from http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/. I was able to install this package. Beforehand, I installed python from python.org (I read about the need to do this rather than use the shipped python for mac os x). So, the original python is in /usr/bin/python and the other, newer one, is in /usr/local/bin/python. However, after running "ipython -pylab", I get an error message: Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24) Type "copyright", "credits" or "license" for more information. IPython 0.13 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. [TerminalIPythonApp] GUI event loop or pylab initialization failed --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /Library/Python/2.7/site-packages/ipython-0.13-py2.7.egg/IPython/core/pylabtools.pyc in find_gui_and_backend(gui) 194 """ 195 --> 196 import matplotlib 197 198 if gui and gui != 'auto': ImportError: No module named matplotlib It seems that I don't have a module-- but I just installed it? Side note: I've read to the best of my ability this page here, http://matplotlib.sourceforge.net/faq/installing_faq.html#os-x-notes , but there seems to be a disconnect on this page between the actual installation procedure. For example, no where on this page does it mention about a *.dmg file, yet the sourceforge site has the *.dmg file. And this help site mentions *.zip files, but this time the sourceforge download page does not have any *.zip files! What is going on here? Thanks, Tim |
|
From: mgurling <mag...@gm...> - 2012-08-17 18:51:22
|
I've attached 2.py and 3.py which differ only in how many bars are graphed. The "nudge" variable was intended to move the left-most bar away from the y-axis. This approach seems to work for graphs containing more than 2 bars, but not those with only 2 bars. I'm curious about this behaviour and am interested in a solution for 2-bar graphs. http://matplotlib.1069221.n5.nabble.com/file/n38539/2.py 2.py http://matplotlib.1069221.n5.nabble.com/file/n38539/3.py 3.py -- View this message in context: http://matplotlib.1069221.n5.nabble.com/space-between-bar-and-y-axis-works-with-2-bars-not-with-3-tp38539.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Liang W. <fra...@gm...> - 2012-08-17 18:10:45
|
Appears that I have to build my own python with tk/tcl instead of using the default python, then rebuild mpl. What a pain. Like this: http://shanit.blogspot.com/2011/03/configuring-python-matplotlib-displays.html On Fri, Aug 17, 2012 at 11:51 AM, Liang Wang <fra...@gm...> wrote: > yes Eric, it was built without tk. But how do I specify the path to the tk > lib and headfile? I found them but have no idea how to pass them to the mpl > build. > > Already thankful for your suggestions. > On Aug 17, 2012 11:14 AM, "Moore, Eric (NIH/NIDDK) [F]" < > eri...@ni...> wrote: > >> ** ** >> >> ** ** >> >> *From:* Liang Wang [mailto:fra...@gm...] >> *Sent:* Thursday, August 16, 2012 6:50 PM >> *To:* Benjamin Root >> *Cc:* mat...@li... >> *Subject:* Re: [Matplotlib-users] Any available backend for non-root >> users?**** >> >> ** ** >> >> Thank you Ben,**** >> >> I did use -X option upon ssh and I am running linux locally. The DISPLAY >> variable is automatically "localhost:17.0", where the number 17 changes for >> each login. But Tk would not work even after I export a new value to >> DISPLAY like ":0.0". I even tried reinstalling matplotlib (from source or >> through easy_install) with both values of DISPLAY but it always warns that >> Tk window failed to open. When I try to use TkAgg, it says**** >> >> ** ** >> >> ...**** >> >> import matplotlib.backends.tkagg as tkagg**** >> >> File >> "/ccs/home/lag69/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py", >> line 1, in <module>**** >> >> import _tkagg**** >> >> ImportError: No module named _tkagg**** >> >> ** ** >> >> So far I haven't solved this problem and I have to generate png files to >> view them (I can view them by xview or display of ImageMagick so the x11 >> forwarding does work) **** >> >> ** ** >> >> This is odd, and I almost lost my patient to try. But I still want to >> appreciate your generous help, Ben.**** >> >> ** ** >> >> regards,**** >> >> Liang**** >> >> On Thu, Aug 16, 2012 at 4:54 PM, Benjamin Root <ben...@ou...> wrote:** >> ** >> >> ** ** >> >> On Thu, Aug 16, 2012 at 4:26 PM, Liang Wang <fra...@gm...> wrote:* >> *** >> >> Hi everyone. I have trouble to find a usable background on a remote >> server where I do not have root privilege. Unfortunately, there is no >> backend available:**** >> >> ** ** >> >> Tkinter: no**** >> >> * Using default library and include directories >> for**** >> >> * Tcl and Tk because a Tk window failed to open.* >> *** >> >> * You may need to define DISPLAY for Tk to work so >> **** >> >> * that setup can determine where your libraries >> are**** >> >> * located. Tkinter present, but header files are >> not**** >> >> * found. You may need to install development**** >> >> * packages.**** >> >> Gtk+: no**** >> >> * Building for Gtk+ requires pygtk; you must be >> able**** >> >> * to "import gtk" in your build/install >> environment **** >> >> Mac OS X native: no**** >> >> Qt: no**** >> >> Qt4: no**** >> >> PySide: no**** >> >> Cairo: no**** >> >> ** ** >> >> The output of a simple script is**** >> >> ==================**** >> >> simple_plot.py:**** >> >> #**** >> >> from pylab import ***** >> >> plot([1,2,3])**** >> >> show()**** >> >> #**** >> >> python simple_plot.py --verbose-helpful > output.txt**** >> >> ==================**** >> >> $HOME=/ccs/home/user1**** >> >> CONFIGDIR=/ccs/home/user1/.matplotlib**** >> >> matplotlib data path >> /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data >> **** >> >> loaded rc file >> /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/matplotlibrc >> **** >> >> matplotlib version 1.1.0**** >> >> verbose.level helpful**** >> >> interactive is False**** >> >> platform is linux2**** >> >> Using fontManager instance from /ccs/home/user1/.matplotlib/fontList.cache >> **** >> >> backend agg version v2.2**** >> >> ** ** >> >> When I tried to install pygtk, it requires glib, which is missing, and I >> just did not digg further. So, is there any workaround that I can get ANY >> backend to work (to show images on screen). **** >> >> ** ** >> >> ** ** >> >> Any suggestions will be greatly appreciated (I really want to get things >> to work).**** >> >> ** ** >> >> Regards,**** >> >> Liang**** >> >> ** ** >> >> >> The Agg backend is always available for non-interactive plotting. In >> other words, you won't be able to do a show() call, but you can save to any >> of the image formats. The TkAgg backend should also be an option (unless >> that python was built without Tk, which is rare). Often, if Tk isn't >> working, it is a simple matter of setting your display environment >> correctly. Most of the time, simply passing the "-X" option to ssh is >> sufficient (assuming you are sshing from a linux box). Otherwise, I think >> you have to mess around with your DISPLAY environment variable on the >> remote server (I think it is usually ":0.0", but I am no expert on this. >> >> I hope that helps! >> Ben Root**** >> >> ** ** >> >> ** ** >> >> You need to install one of the optional backends. In your original email >> the output you included is showing “no” for all of the interactive >> backends. So somewhere when you’re building mpl, either you don’t have the >> right things installed or the build is unable to locate them. Tk wasn’t >> found during the build, so no module called _tkagg was built, hence the >> import fails as you report in your second email. Your current problem isn’t >> with DISPLAY, but with the build. Hopefully someone else can suggest some >> appropriate steps to take to solve you build problems, but I’d first check >> if your python was built with Tk. **** >> >> ** ** >> >> Eric**** >> >> ** ** >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> |
|
From: Liang W. <fra...@gm...> - 2012-08-17 15:51:23
|
yes Eric, it was built without tk. But how do I specify the path to the tk lib and headfile? I found them but have no idea how to pass them to the mpl build. Already thankful for your suggestions. On Aug 17, 2012 11:14 AM, "Moore, Eric (NIH/NIDDK) [F]" <eri...@ni...> wrote: > ** ** > > ** ** > > *From:* Liang Wang [mailto:fra...@gm...] > *Sent:* Thursday, August 16, 2012 6:50 PM > *To:* Benjamin Root > *Cc:* mat...@li... > *Subject:* Re: [Matplotlib-users] Any available backend for non-root > users?**** > > ** ** > > Thank you Ben,**** > > I did use -X option upon ssh and I am running linux locally. The DISPLAY > variable is automatically "localhost:17.0", where the number 17 changes for > each login. But Tk would not work even after I export a new value to > DISPLAY like ":0.0". I even tried reinstalling matplotlib (from source or > through easy_install) with both values of DISPLAY but it always warns that > Tk window failed to open. When I try to use TkAgg, it says**** > > ** ** > > ...**** > > import matplotlib.backends.tkagg as tkagg**** > > File > "/ccs/home/lag69/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py", > line 1, in <module>**** > > import _tkagg**** > > ImportError: No module named _tkagg**** > > ** ** > > So far I haven't solved this problem and I have to generate png files to > view them (I can view them by xview or display of ImageMagick so the x11 > forwarding does work) **** > > ** ** > > This is odd, and I almost lost my patient to try. But I still want to > appreciate your generous help, Ben.**** > > ** ** > > regards,**** > > Liang**** > > On Thu, Aug 16, 2012 at 4:54 PM, Benjamin Root <ben...@ou...> wrote:*** > * > > ** ** > > On Thu, Aug 16, 2012 at 4:26 PM, Liang Wang <fra...@gm...> wrote:** > ** > > Hi everyone. I have trouble to find a usable background on a remote server > where I do not have root privilege. Unfortunately, there is no backend > available:**** > > ** ** > > Tkinter: no**** > > * Using default library and include directories for > **** > > * Tcl and Tk because a Tk window failed to open.** > ** > > * You may need to define DISPLAY for Tk to work so > **** > > * that setup can determine where your libraries are > **** > > * located. Tkinter present, but header files are > not**** > > * found. You may need to install development**** > > * packages.**** > > Gtk+: no**** > > * Building for Gtk+ requires pygtk; you must be > able**** > > * to "import gtk" in your build/install > environment **** > > Mac OS X native: no**** > > Qt: no**** > > Qt4: no**** > > PySide: no**** > > Cairo: no**** > > ** ** > > The output of a simple script is**** > > ==================**** > > simple_plot.py:**** > > #**** > > from pylab import ***** > > plot([1,2,3])**** > > show()**** > > #**** > > python simple_plot.py --verbose-helpful > output.txt**** > > ==================**** > > $HOME=/ccs/home/user1**** > > CONFIGDIR=/ccs/home/user1/.matplotlib**** > > matplotlib data path > /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data > **** > > loaded rc file > /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/matplotlibrc > **** > > matplotlib version 1.1.0**** > > verbose.level helpful**** > > interactive is False**** > > platform is linux2**** > > Using fontManager instance from /ccs/home/user1/.matplotlib/fontList.cache > **** > > backend agg version v2.2**** > > ** ** > > When I tried to install pygtk, it requires glib, which is missing, and I > just did not digg further. So, is there any workaround that I can get ANY > backend to work (to show images on screen). **** > > ** ** > > ** ** > > Any suggestions will be greatly appreciated (I really want to get things > to work).**** > > ** ** > > Regards,**** > > Liang**** > > ** ** > > > The Agg backend is always available for non-interactive plotting. In > other words, you won't be able to do a show() call, but you can save to any > of the image formats. The TkAgg backend should also be an option (unless > that python was built without Tk, which is rare). Often, if Tk isn't > working, it is a simple matter of setting your display environment > correctly. Most of the time, simply passing the "-X" option to ssh is > sufficient (assuming you are sshing from a linux box). Otherwise, I think > you have to mess around with your DISPLAY environment variable on the > remote server (I think it is usually ":0.0", but I am no expert on this. > > I hope that helps! > Ben Root**** > > ** ** > > ** ** > > You need to install one of the optional backends. In your original email > the output you included is showing “no” for all of the interactive > backends. So somewhere when you’re building mpl, either you don’t have the > right things installed or the build is unable to locate them. Tk wasn’t > found during the build, so no module called _tkagg was built, hence the > import fails as you report in your second email. Your current problem isn’t > with DISPLAY, but with the build. Hopefully someone else can suggest some > appropriate steps to take to solve you build problems, but I’d first check > if your python was built with Tk. **** > > ** ** > > Eric**** > > ** ** > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Moore, E. (NIH/N. [F] <eri...@ni...> - 2012-08-17 15:13:17
|
From: Liang Wang [mailto:fra...@gm...]
Sent: Thursday, August 16, 2012 6:50 PM
To: Benjamin Root
Cc: mat...@li...
Subject: Re: [Matplotlib-users] Any available backend for non-root users?
Thank you Ben,
I did use -X option upon ssh and I am running linux locally. The DISPLAY variable is automatically "localhost:17.0", where the number 17 changes for each login. But Tk would not work even after I export a new value to DISPLAY like ":0.0". I even tried reinstalling matplotlib (from source or through easy_install) with both values of DISPLAY but it always warns that Tk window failed to open. When I try to use TkAgg, it says
...
import matplotlib.backends.tkagg as tkagg
File "/ccs/home/lag69/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py", line 1, in <module>
import _tkagg
ImportError: No module named _tkagg
So far I haven't solved this problem and I have to generate png files to view them (I can view them by xview or display of ImageMagick so the x11 forwarding does work)
This is odd, and I almost lost my patient to try. But I still want to appreciate your generous help, Ben.
regards,
Liang
On Thu, Aug 16, 2012 at 4:54 PM, Benjamin Root <ben...@ou...<mailto:ben...@ou...>> wrote:
On Thu, Aug 16, 2012 at 4:26 PM, Liang Wang <fra...@gm...<mailto:fra...@gm...>> wrote:
Hi everyone. I have trouble to find a usable background on a remote server where I do not have root privilege. Unfortunately, there is no backend available:
Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.
* You may need to define DISPLAY for Tk to work so
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages.
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
PySide: no
Cairo: no
The output of a simple script is
==================
simple_plot.py:
#
from pylab import *
plot([1,2,3])
show()
#
python simple_plot.py --verbose-helpful > output.txt
==================
$HOME=/ccs/home/user1
CONFIGDIR=/ccs/home/user1/.matplotlib
matplotlib data path /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data
loaded rc file /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/matplotlibrc
matplotlib version 1.1.0
verbose.level helpful
interactive is False
platform is linux2
Using fontManager instance from /ccs/home/user1/.matplotlib/fontList.cache
backend agg version v2.2
When I tried to install pygtk, it requires glib, which is missing, and I just did not digg further. So, is there any workaround that I can get ANY backend to work (to show images on screen).
Any suggestions will be greatly appreciated (I really want to get things to work).
Regards,
Liang
The Agg backend is always available for non-interactive plotting. In other words, you won't be able to do a show() call, but you can save to any of the image formats. The TkAgg backend should also be an option (unless that python was built without Tk, which is rare). Often, if Tk isn't working, it is a simple matter of setting your display environment correctly. Most of the time, simply passing the "-X" option to ssh is sufficient (assuming you are sshing from a linux box). Otherwise, I think you have to mess around with your DISPLAY environment variable on the remote server (I think it is usually ":0.0", but I am no expert on this.
I hope that helps!
Ben Root
You need to install one of the optional backends. In your original email the output you included is showing "no" for all of the interactive backends. So somewhere when you're building mpl, either you don't have the right things installed or the build is unable to locate them. Tk wasn't found during the build, so no module called _tkagg was built, hence the import fails as you report in your second email. Your current problem isn't with DISPLAY, but with the build. Hopefully someone else can suggest some appropriate steps to take to solve you build problems, but I'd first check if your python was built with Tk.
Eric
|
|
From: Liang W. <fra...@gm...> - 2012-08-16 22:50:12
|
Thank you Ben,
I did use -X option upon ssh and I am running linux locally. The DISPLAY
variable is automatically "localhost:17.0", where the number 17 changes for
each login. But Tk would not work even after I export a new value to
DISPLAY like ":0.0". I even tried reinstalling matplotlib (from source or
through easy_install) with both values of DISPLAY but it always warns that
Tk window failed to open. When I try to use TkAgg, it says
...
import matplotlib.backends.tkagg as tkagg
File
"/ccs/home/lag69/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/backends/tkagg.py",
line 1, in <module>
import _tkagg
ImportError: No module named _tkagg
So far I haven't solved this problem and I have to generate png files to
view them (I can view them by xview or display of ImageMagick so the x11
forwarding does work)
This is odd, and I almost lost my patient to try. But I still want to
appreciate your generous help, Ben.
regards,
Liang
On Thu, Aug 16, 2012 at 4:54 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Thu, Aug 16, 2012 at 4:26 PM, Liang Wang <fra...@gm...> wrote:
>
>> Hi everyone. I have trouble to find a usable background on a remote
>> server where I do not have root privilege. Unfortunately, there is no
>> backend available:
>>
>> Tkinter: no
>> * Using default library and include directories
>> for
>> * Tcl and Tk because a Tk window failed to open.
>> * You may need to define DISPLAY for Tk to work so
>> * that setup can determine where your libraries
>> are
>> * located. Tkinter present, but header files are
>> not
>> * found. You may need to install development
>> * packages.
>> Gtk+: no
>> * Building for Gtk+ requires pygtk; you must be
>> able
>> * to "import gtk" in your build/install
>> environment
>> Mac OS X native: no
>> Qt: no
>> Qt4: no
>> PySide: no
>> Cairo: no
>>
>> The output of a simple script is
>> ==================
>> simple_plot.py:
>> #
>> from pylab import *
>> plot([1,2,3])
>> show()
>> #
>> python simple_plot.py --verbose-helpful > output.txt
>> ==================
>> $HOME=/ccs/home/user1
>> CONFIGDIR=/ccs/home/user1/.matplotlib
>> matplotlib data path
>> /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data
>> loaded rc file
>> /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/matplotlibrc
>> matplotlib version 1.1.0
>> verbose.level helpful
>> interactive is False
>> platform is linux2
>> Using fontManager instance from /ccs/home/user1/.matplotlib/fontList.cache
>> backend agg version v2.2
>>
>> When I tried to install pygtk, it requires glib, which is missing, and I
>> just did not digg further. So, is there any workaround that I can get ANY
>> backend to work (to show images on screen).
>>
>>
>> Any suggestions will be greatly appreciated (I really want to get things
>> to work).
>>
>> Regards,
>> Liang
>>
>>
> The Agg backend is always available for non-interactive plotting. In
> other words, you won't be able to do a show() call, but you can save to any
> of the image formats. The TkAgg backend should also be an option (unless
> that python was built without Tk, which is rare). Often, if Tk isn't
> working, it is a simple matter of setting your display environment
> correctly. Most of the time, simply passing the "-X" option to ssh is
> sufficient (assuming you are sshing from a linux box). Otherwise, I think
> you have to mess around with your DISPLAY environment variable on the
> remote server (I think it is usually ":0.0", but I am no expert on this.
>
> I hope that helps!
> Ben Root
>
>
|