SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(8)
2
(14)
3
(22)
4
(13)
5
(11)
6
(12)
7
(4)
8
(6)
9
(19)
10
(14)
11
(16)
12
(6)
13
(15)
14
(6)
15
(8)
16
(22)
17
(17)
18
(8)
19
(16)
20
(19)
21
(3)
22
(6)
23
(18)
24
(26)
25
(17)
26
(13)
27
(18)
28
(8)
29
30
(14)
31
(30)




Showing results of 394

<< < 1 .. 12 13 14 15 16 > >> (Page 14 of 16)
From: Pablo R. <rom...@ho...> - 2009年03月06日 08:28:37
Attachments: pressure.png
Hello,
I have a question about plotting pressure contours with matplotlib.
 
I've seen other applications using matplotlib where the pressure contours are drawn with annoted text "H" and "L" characters being drawn in the centers of closed contours...
 
i.e., if there is a closed contour line, and its value is over a certain threshold value, plot an "H" to indicate a "high pressure zone", else plot a "L" to indicate a "low pressure zone." 
 
This is standard weather map plotting stuff, and Ive definitely seen other plots produced using matplotlib that inlude these annoted "H" and "L" characters. In the application Ive seen, the process was most definitely automated, since it was applied to a large number of plots (i.e., the "H"'s and "L"'s werent added manually, since its not feasible). Unfortunately, the creators of these plots are not willing to share their technique.
 
I dont know how to set this up with matplotlib.
Does anyone have any experience with this???
Is there any way to identify a "closed contour" & its value from a "contour class" that is returned from matplotlib's contour() function???
 
 
I've attached a sample matplotlib/basemap plot that shows what I want to accomplish (again, its creators are unwiling to help me). You can see the "H" and "L" characters in the centers of high&low pressure closed contours.
 
 
Please help,
 
Thanks,
P.Romero
 
_________________________________________________________________
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme 
From: Eric F. <ef...@ha...> - 2009年03月06日 02:34:17
Luke wrote:
> I have a problem where I cannot mesh up a square space and use contour
> because there are many infeasible regions of the plot (no solution to
> the equations of which I am plotting level curves). Here is an
> example of the type of contour plot I am looking to achieve:
> http://www.dlpeterson.com/levelcurve_test.pdf
> 
> The level curve lines in the .pdf above were generated by numerically
> integrating the vectors that are tangent to the level curve. Given an
> initial condition on the level curve, I can integrate forward and
> backwards in the parameter to generate the whole level curve. The
> problem is that this approach gives me numpy arrays that have the x,y
> pairs for each point on the line. So I plot the level curves using
> the plot command, but then I have no good way to label them.
> 
> Is it possible to label plot lines analogously to the way they show up
> on clabel? I had to do all the line labeling by hand in Illustrator,
> after I generated the plot, and it was a pain, and very time
> consuming.
I don't think there is any built-in easy way to do it.
I have thought before that it would be good to have labeled-line and 
possibly labeled-line-collection classes, which contour clabel could 
then use, and which would allow easy manipulation of the label locations 
(position along the line) as well as text properties. The idea is to 
have the line-breaking be done late and reversibly--probably at drawing 
time--so that the break in the line always fits the text, and so that 
the text can be moved at will. I don't have time to work on this, 
though. Maybe someone else will pick it up.
Eric
> 
> Thanks,
> ~Luke
From: Pablo R. <rom...@ho...> - 2009年03月06日 02:29:36
Hi,
I need help doing the following:
 
I need to create a square png image (256x256 pixels) with NO margins. I need my plot area to completely fill this 256x256 box, regardless of what the plot's aspect ratio should be; i.e., I want the plot area stretched or compressed either in the vertical or horizontal direction so that the plot completely fills png output...no margins at either the top&bottom or left&right edges.
 
The data Im plotting is geographic lat&lon ranges, and these areas are not perfectly square, they are more rectangular. matplotlib tries to maintain the aspect ratio in my plots and so it always adds margins to the top&bottom of my plot edges. I need to tell matplotlib to ignore the fact that the plot should be rectangular, and instead plot it to fit my figure size, even if this visually deforms my plot.
 
 
I understand that if I set the axes, I can somewhat control the margin size, so doing something like 'axes([0,0,1,1],frameon='false')' should eliminate the margins. I see that the axes() function has a 'set_aspect()' function, but Im not clear on how to use it, and Im even sure that it can do what I need it to do; 'disable' the aspect ratio and fill my figure area with my plot....
 
So, again, what can I do to completely fill the 2.56"x2.56" square figure ??? (even when the plot is NOT square, its rectangular...)
 
 
Please help,
P.Romero
 
_________________________________________________________________
Windows LiveTM Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
From: Daniel S. <dan...@gm...> - 2009年03月06日 02:08:37
brilliant. that worked nicely.
thanks ryan,
drs
On 5 Mar 2009, at 17:44, Ryan May wrote:
>
>
> On Thu, Mar 5, 2009 at 6:24 PM, Daniel Soto <dan...@gm...> 
> wrote:
> i'm having a problem with an xlabel getting chopped off at the bottom
> of a figure.
> i've looked through the matplotlibrc parameters and can't find
> anything that addresses
> this. toying with the figure.subplot.* didn't seem to have an
> effect. how can i prevent
> this from happening?
>
> Try:
>
> figure.subplots_adjust(bottom=0.2)
>
> Ryan
>
> -- 
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
From: Ryan M. <rm...@gm...> - 2009年03月06日 01:47:53
On Thu, Mar 5, 2009 at 6:24 PM, Daniel Soto <dan...@gm...> wrote:
> i'm having a problem with an xlabel getting chopped off at the bottom
> of a figure.
> i've looked through the matplotlibrc parameters and can't find
> anything that addresses
> this. toying with the figure.subplot.* didn't seem to have an
> effect. how can i prevent
> this from happening?
Try:
figure.subplots_adjust(bottom=0.2)
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Luke <haz...@gm...> - 2009年03月06日 00:27:19
I have a problem where I cannot mesh up a square space and use contour
because there are many infeasible regions of the plot (no solution to
the equations of which I am plotting level curves). Here is an
example of the type of contour plot I am looking to achieve:
http://www.dlpeterson.com/levelcurve_test.pdf
The level curve lines in the .pdf above were generated by numerically
integrating the vectors that are tangent to the level curve. Given an
initial condition on the level curve, I can integrate forward and
backwards in the parameter to generate the whole level curve. The
problem is that this approach gives me numpy arrays that have the x,y
pairs for each point on the line. So I plot the level curves using
the plot command, but then I have no good way to label them.
Is it possible to label plot lines analogously to the way they show up
on clabel? I had to do all the line labeling by hand in Illustrator,
after I generated the plot, and it was a pain, and very time
consuming.
Thanks,
~Luke
From: Daniel S. <dan...@gm...> - 2009年03月06日 00:24:49
i'm having a problem with an xlabel getting chopped off at the bottom 
of a figure.
i've looked through the matplotlibrc parameters and can't find 
anything that addresses
this. toying with the figure.subplot.* didn't seem to have an 
effect. how can i prevent
this from happening?
thx,
drs
From: Jose Gomez-D. <jgo...@gm...> - 2009年03月05日 20:44:23
Jeff,
Solved, I think!
2009年3月3日 Jose Gomez-Dans <jgo...@gm...>:
> OK, I wasn't aware of this. However, memory consumption still flies. I am
> aware that it could be other bits of the program that are eating up loads of
> memory, but I don't know how to test where the bottleneck is. In the end, I
> resorted to getting rid of basemap instances, but the problem persists.
> There must be something in what I'm doing that's eating memory up, but I'm
> not sure how to check what it is.
A message to the list suggested that calling pyplot.close( fig_num)
freed up the memory used, which I'm happy to report, is happening. I
still haven't managed to "cut and paste" a background into my figures,
but we'll get there... eventually!!!
Thanks!
Jose
From: Timmie <tim...@gm...> - 2009年03月05日 18:40:57
Hello,
I tried to modify the bar chart demo for my case.
I want to plot only bar charts for one data set.
But the xticklables are not centered below the bars, rather are they left in
place as if there were still two data sets.
How do I modify set_xticklabels in oder to get the lables centered below the bar
one data set?
Thanks in advance,
Timmie
#### modified bar charts demo 
#!/usr/bin/env python
# a bar plot with errorbars
import numpy as np
import matplotlib.pyplot as plt
N = 5
menMeans = (20, 35, 30, 35, 27)
menStd = (2, 3, 4, 1, 2)
ind = np.arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
fig = plt.figure()
ax = fig.add_subplot(111)
rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd)
womenMeans = (25, 32, 34, 20, 25)
womenStd = (3, 5, 2, 3, 3)
#~ rects2 = ax.bar(ind+width, womenMeans, width, color='y', yerr=womenStd)
# add some
ax.set_ylabel('Scores')
ax.set_title('Scores by group and gender')
ax.set_xticks(ind+width)
ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5'), multialignment='left',
position=(-2,0) )
#~ ax.legend( (rects1[0], rects2[0]), ('Men', 'Women') )
def autolabel(rects):
 # attach some text labels
 for rect in rects:
 #~ print rect
 height = rect.get_height()
 print height
 ax.text(rect.get_x()+rect.get_width()/2., 1.05*height, '%d'%int(height),
 ha='center', va='bottom')
 
autolabel(rects1)
#~ autolabel(rects2)
plt.show()
From: Chaitanya K. <ic...@gm...> - 2009年03月05日 17:10:57
Hi all,
I am wondering how I can get space in the axis label while using the Latex mode.
That is, when I use pylab.ylabel(r'$V [A^{3}]$') I don't get any space
in between V and [.
I also tried using the math mode spacing for Latex, So, if I try to do
pylab.ylabel(r'$V\;[A^{3}]$'), I only get V and not even A^3.
Any help is appreciated.
Chaitanya
From: Erik G. <egr...@gm...> - 2009年03月05日 17:03:47
Hello,
I found an issue in working with subplots and using figlegend: it
doesn't display markers. This code illustrates the problem:
x=r_[0.:11.:1.]
y=x**1.5
figure()
subplot(211)
line=plot(x,y,'sb-.')
figlegend( (line,),('y',),'right' )
Supplying the "numpoints" keyword to figlegend doesn't seem to have
any effect, ie. I get the same results with:
figlegend( (line,),('y',),'right',numpoints=10 )
Is this the intended behavior? Is there a good way to display the markers?
I did find a workaround, but I don't think this is the ideal method:
x=r_[0.:11.:1.]
y=x**1.5
figure()
subplot(111)
line=plot(x,y,'sb-.')
figlegend( (line,),('y',),'right' )
subplot(211)
line=plot(x,y,'sb-.')
Thanks,
-Erik
From: Erik G. <egr...@gm...> - 2009年03月05日 16:18:37
Hello,
I am generating a figure with 4 subplots, then using the "figlegend"
command to generate a legend on the right side of the four plots.
This is part of a script designed to handle varrying numbers of lines
to be plotted, so sometimes the legend has many entries and sometimes
it has a few. Is there an easy way to prevent the legend from
extending beyond the figure boundaries when the legend has many
entries, ie. to automatically adjust the vertical spacing in the
legend, font size, etc. to make it fit?
Thanks,
-Erik
From: Ryan M. <rm...@gm...> - 2009年03月05日 15:50:27
On Thu, Mar 5, 2009 at 1:56 AM, Torsten Bronger <
br...@ph...> wrote:
> Hallöchen!
>
> In my web app, I have an "about" page which contains the major
> components, together with the logos (Ubuntu, Apache, Django etc).
> http://matplotlib.sourceforge.net/_static/logo2.png is too wide, and
> since the name is in the list anyway, I'd like to have the circular
> plot itself. Do you have it separately, or the Python code which
> generates it? Thank you!
You can find the script here:
http://matplotlib.sourceforge.net/examples/api/logo2.html
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
From: Jorg R. <jo...@ne...> - 2009年03月05日 15:32:58
Hi
I'm plotting a value for each day as bars, and another value for the same
exact time as a regular graph. The problem is that the bars overlap, so I
thought I could try to make the plot wider, to make more room, but I have
been unable to do so. I was thinking that if I increased the space between
ticks, that would solve the problem, but I've not found out how that is
done either. Can I control the space between the ticks?
I would be grateful for any hints into how I could solve this:)
My graph looks like this:
http://neoplex.org/bob/test.png
And my code looks like this:
http://neoplex.org/bob/plot_packages.py.txt
And if it matters, the data is here:
http://neoplex.org/bob/data.txt
regards
Jorg
From: Timmie <tim...@gm...> - 2009年03月05日 15:00:10
Hello,
I have a question regarding autolabels for bar charts.
It seems that the pie charts have already incorporated such a functionality [1].
Is there any reason why this isn't built in the bar chart function [2]?
The function I am referring to is:
def autolabel(rects):
 # attach some text labels
 for rect in rects:
 #~ print rect
 height = rect.get_height()
 print height
 ax.text(rect.get_x()+rect.get_width()/2., 1.05*height, '%d'%int(height),
 ha='center', va='bottom')
Thanks in advance for the clarification,
Timmie
[1]
http://matplotlib.sourceforge.net/examples/pylab_examples/pie_demo.html?highlight=autolabel
[2]
http://matplotlib.sourceforge.net/examples/api/barchart_demo.html?highlight=autolabel
From: Michael D. <md...@st...> - 2009年03月05日 13:10:01
There are at least three possible causes of what you're seeing here:
1) ipython stores references to all results in the console. (ipython 
maintains a history of results so they can easily be accessed later). I 
don't recall the details, but it may be possible to turn this feature 
off or limit the number of objects stored.
2) matplotlib stores references to all figures until they are explicitly 
closed with pyplot.close(fignum)
3) Python uses pools of memory, and is often imposes a significant delay 
returning memory to the operating system. It is actually very hard to 
determine from the outside whether something is leaking or just pooling 
without compiling a special build of Python with memory pooling turned off.
In general, interactive use is somewhat at odds with creating many large 
plots in a single session, since all of the nice interactive features 
(history etc.) do not know automagically when the user is done with 
certain objects.
I am not aware of any memory leaks in current versions of matplotlib 
with *noninteractive* use, other than small leaks caused by bugs in 
older versions of some of the GUI toolkits (notably gtk+). If you find 
a script that produces a leak reproducibly, please share so we can track 
down the cause.
Gary Ruben wrote:
> Doing 
> plot(rand(1000000)) or matshow(rand(1000,1000)) for example eats a big 
> chunk of memory (tried with TkAgg and WxAgg in Windows (mpl v0.98.5.2) 
> and Linux (mpl v0.98.3)), most of which is not returned when the window 
> is closed. The same goes if you create an array, plot it, and explicitly 
> del it after closing the window.
Can you elaborate on these steps? It's possible that the del has little 
effect, since del only deletes a single reference to the object, not all 
references which may be keeping it alive (such as the figure, which 
matplotlib itself keeps a reference to). In general, you need to 
explicitly call pyplot.close(fignum) to delete a figure.
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Torsten B. <br...@ph...> - 2009年03月05日 07:57:24
Hallöchen!
In my web app, I have an "about" page which contains the major
components, together with the logos (Ubuntu, Apache, Django etc).
http://matplotlib.sourceforge.net/_static/logo2.png is too wide, and
since the name is in the list anyway, I'd like to have the circular
plot itself. Do you have it separately, or the Python code which
generates it? Thank you!
Tschö,
Torsten.
P.S.: Cutting it out didn't work because of the background.
-- 
Torsten Bronger, aquisgrana, europa vetus
 Jabber ID: tor...@ja...
From: Gary R. <gr...@bi...> - 2009年03月05日 04:25:25
Is there a summary somewhere of the current state of knowledge about 
memory leaks when using the pylab interface interactively? Doing 
plot(rand(1000000)) or matshow(rand(1000,1000)) for example eats a big 
chunk of memory (tried with TkAgg and WxAgg in Windows (mpl v0.98.5.2) 
and Linux (mpl v0.98.3)), most of which is not returned when the window 
is closed. The same goes if you create an array, plot it, and explicitly 
del it after closing the window. I've seen lots of posts over the years 
about memory leaks, but there's nothing in the FAQ about this. I found 
old posts about similar things, but nothing that had a clear resolution.
thanks,
Gary
From: John H. <jd...@gm...> - 2009年03月04日 17:46:09
On Wed, Mar 4, 2009 at 10:54 AM, per freem <per...@gm...> wrote:
> hi all,
>
> i managed to do linear regression on two vectors x, and y using
> linalg.lstsq. what i can't figure out is how to compute the R-squared value
> - the correlation of the two vectors - in matplotlib. can someone please
> point me to the right function? thank you.
You should use numpy rather than matplotlib. R-squared is the square of the
correlation coefficient, so
In [162]: c = np.corrcoef(x, y)[0,1]
In [163]: r2 = c**2
From: per f. <per...@gm...> - 2009年03月04日 16:54:44
hi all,
i managed to do linear regression on two vectors x, and y using
linalg.lstsq. what i can't figure out is how to compute the R-squared value
- the correlation of the two vectors - in matplotlib. can someone please
point me to the right function? thank you.
From: Jeffrey F. <mat...@je...> - 2009年03月04日 14:53:39
I've found that putting the text you want to be sans-serif inside \sf{}
works. So something like:
xlabel(r'$\sf{\Delta direction})
-Jeffrey
On Wed, Mar 4, 2009 at 1:59 AM, Jouni K. Seppänen <jk...@ik...> wrote:
> per freem <per...@gm...> writes:
>
> > i am using the tex feature to put some greek symbols in some labels of my
> > plots. for example,
> >
> > rcParams['text.usetex'] = True
> > plot(a, b, 'o')
> > xlabel('\Delta direction')
>
> Are you sure you need usetex? Matplotlib's own mathtext renderer is
> really quite good these days, and expressions like
>
> xlabel(r'$\Delta$ direction')
>
> should work just fine without usetex.
>
> > the '\Delta' is rendered correctly but that changes the fonts of the
> > tick labels and of all the text in the labels to tex's default font
> > (which looks like times new roman). is there a way to use tex only for
> > greek symbols but retain the default sans-serif font of matplotlib for
> > all the other things?
>
> No, usetex is an all-or-nothing choice. In principle it should be
> possible to change matplotlib to send only some strings (or string
> parts) to TeX, but I guess no-one has needed such a feature badly
> enough - the built-in mathtext renderer is good enough for most uses,
> and the remaining reason to use usetex is that you are including your
> figure in a LaTeX document and want the fonts to perfectly match the
> surrounding text, and in that case the current behavior is exactly
> right.
>
> The ordinary way to specify fonts works with the usetex engine, with the
> restriction that only some fonts are usable with LaTeX. The following
> dictionary (in texmanager.py) has the recognized fonts as keys and the
> corresponding LaTeX packages as (the second part of) the values:
>
> font_info = {'new century schoolbook': ('pnc',
>
> r'\renewcommand{\rmdefault}{pnc}'),
> 'bookman': ('pbk', r'\renewcommand{\rmdefault}{pbk}'),
> 'times': ('ptm', r'\usepackage{mathptmx}'),
> 'palatino': ('ppl', r'\usepackage{mathpazo}'),
> 'zapf chancery': ('pzc', r'\usepackage{chancery}'),
> 'cursive': ('pzc', r'\usepackage{chancery}'),
> 'charter': ('pch', r'\usepackage{charter}'),
> 'serif': ('cmr', ''),
> 'sans-serif': ('cmss', ''),
> 'helvetica': ('phv', r'\usepackage{helvet}'),
> 'avant garde': ('pag', r'\usepackage{avant}'),
> 'courier': ('pcr', r'\usepackage{courier}'),
> 'monospace': ('cmtt', ''),
> 'computer modern roman': ('cmr', ''),
> 'computer modern sans serif': ('cmss', ''),
> 'computer modern typewriter': ('cmtt', '')}
>
> --
> Jouni K. Seppänen
> http://www.iki.fi/jks
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a 600ドル discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Fernando P. <fpe...@gm...> - 2009年03月04日 13:51:21
Hi all,
sorry for the spam, but in case any of you are coming to the SIAM
Conference on Computational Science and Engineering (CSE09) in Miami:
http://www.siam.org/meetings/cse09/
you might be interested in stopping by the Python sessions on Thursday:
http://meetings.siam.org/sess/dsp_programsess.cfm?SESSIONCODE=8044
http://meetings.siam.org/sess/dsp_programsess.cfm?SESSIONCODE=8045
http://meetings.siam.org/sess/dsp_programsess.cfm?SESSIONCODE=8046
Think of it as the East Coast March mini-edition of Scipy'09 ;)
Cheers,
f
From: Jouni K. S. <jk...@ik...> - 2009年03月04日 07:00:16
per freem <per...@gm...> writes:
> i am using the tex feature to put some greek symbols in some labels of my
> plots. for example,
>
> rcParams['text.usetex'] = True
> plot(a, b, 'o')
> xlabel('\Delta direction')
Are you sure you need usetex? Matplotlib's own mathtext renderer is
really quite good these days, and expressions like
xlabel(r'$\Delta$ direction')
should work just fine without usetex.
> the '\Delta' is rendered correctly but that changes the fonts of the
> tick labels and of all the text in the labels to tex's default font
> (which looks like times new roman). is there a way to use tex only for
> greek symbols but retain the default sans-serif font of matplotlib for
> all the other things?
No, usetex is an all-or-nothing choice. In principle it should be
possible to change matplotlib to send only some strings (or string
parts) to TeX, but I guess no-one has needed such a feature badly
enough - the built-in mathtext renderer is good enough for most uses,
and the remaining reason to use usetex is that you are including your
figure in a LaTeX document and want the fonts to perfectly match the 
surrounding text, and in that case the current behavior is exactly
right.
The ordinary way to specify fonts works with the usetex engine, with the
restriction that only some fonts are usable with LaTeX. The following
dictionary (in texmanager.py) has the recognized fonts as keys and the
corresponding LaTeX packages as (the second part of) the values:
 font_info = {'new century schoolbook': ('pnc',
 r'\renewcommand{\rmdefault}{pnc}'),
 'bookman': ('pbk', r'\renewcommand{\rmdefault}{pbk}'),
 'times': ('ptm', r'\usepackage{mathptmx}'),
 'palatino': ('ppl', r'\usepackage{mathpazo}'),
 'zapf chancery': ('pzc', r'\usepackage{chancery}'),
 'cursive': ('pzc', r'\usepackage{chancery}'),
 'charter': ('pch', r'\usepackage{charter}'),
 'serif': ('cmr', ''),
 'sans-serif': ('cmss', ''),
 'helvetica': ('phv', r'\usepackage{helvet}'),
 'avant garde': ('pag', r'\usepackage{avant}'),
 'courier': ('pcr', r'\usepackage{courier}'),
 'monospace': ('cmtt', ''),
 'computer modern roman': ('cmr', ''),
 'computer modern sans serif': ('cmss', ''),
 'computer modern typewriter': ('cmtt', '')}
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Jouni K. S. <jk...@ik...> - 2009年03月04日 06:46:28
Daniel Soto <dan...@gm...> writes:
> as far as the pdf.compression not working, i was using rcParams in the
> script so i'm almost certain the options were being loaded.
A quick way to check if your pdf.compression setting is being picked up
is to grep the pdf file for /FlateDecode. If pdf.compression is set to 0,
the string should not occur (except of course if you use it in a figure
title or other text), if it is set to any other value, the string should
occur.
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Eric F. <ef...@ha...> - 2009年03月04日 02:35:16
lionel keene wrote:
> Hello all, I'd like to create a "matplotlib.pyplot.figure(...)" object
> and specify the size while I'm at it. I see this argument list from
> the matplotlib's documentation:
> 
> pyplot.figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
> 
> The on-screen size is being computed using inches (for height and
> width) and dpi. But I don't know what the dpi is in advance. What can
> I do? In case it's relevant, I'm using Python 2.5 and the latest
> download of matplotlib.
> 
> Thanks in advance.
> 
> -L
I'm not quite sure I understand; if you don't know the dpi when you 
create the figure, when *will* you know it?
Lack of knowledge of the actual dpi of a display is a general problem, 
and I don't know of any general solution. Typically one has to guess, 
or let the user measure it and input it as a variable at the start of a 
graphics program. Ideally, every display would communicate its dpi to 
the operating system, and graphics software would be able to read and 
use this value. I don't know if any systems actually work this way.
Eric
15 messages has been excluded from this view by a project administrator.

Showing results of 394

<< < 1 .. 12 13 14 15 16 > >> (Page 14 of 16)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /