[Matplotlib-users] make plot() cycle through line style instead of colour

2011-02-15 Thread Sebastian Busch
Dear list, if I do a plot([1,2],[1,2]) plot([1,2],[1,3]) plot([1,2],[1,4]) I will get three lines. All have linestyle='-', the colour is changed automatically: blue, green, red, ... Can I change this behaviour to: All have the colour black, and the linestyle is changed /automatically/ '-', '--'

Re: [Matplotlib-users] ellipk

2010-10-09 Thread Sebastian Busch
hey pau! On 10/09/2010 08:04 AM, Pau wrote: > ... > ImportError: No module named scipy.special > ... do you have scipy installed? i.e. does import scipy work? if so, what is scipy.__version__ ? here, it's 0.7.0... if scipy is not installed, i think you need to install it in order to access e

Re: [Matplotlib-users] ellipk

2010-10-08 Thread Sebastian Busch
hey pau, ellipk is in scipy.special: #!/usr/bin/env python from pylab import * from scipy.special import ellipk e=1. a_mpc = 4.0 p = a_mpc * (1 - e**2.) Phase = 4.*sqrt(p/(p -6. - 2.*e)) * ellipk(-4.*e/(p - 6. -2.*e)) greetings, sebastian. signature.asc Description: OpenPGP digital signatur

Re: [Matplotlib-users] How do you use ticklabel_format?

2010-02-03 Thread Sebastian Busch
Joseph Smidt wrote: > Hello, > > I'm trying to make a simple plot that doesn't use scientific > notation for the x axis ... > Is there way to use this > ScalarFormatter some how? ... does this help? from pylab import * a = arange(1600) plot(a,a) xscale('log') from matplotlib.ticker import S

Re: [Matplotlib-users] Problem using TeX

2010-01-29 Thread Sebastian Busch
Florian Lindner wrote: > Hello, > > I try to use LaTeX in my plot > > flor...@horus:~> cat .matplotlib/matplotlibrc > text.usetex: true > > My plotting code looks like: > > Ma = arange(1.0, 5.0, 0.01) > Ts = [T(i) for i in Ma] # BTW: Is there a way to spare this line? not sure what

Re: [Matplotlib-users] vector EPS

2010-01-21 Thread Sebastian Busch
Matthew Czesarski wrote: ... it seems that MPL rasterizes everything in the production of its EPS output. Is there any way to get around this ... hi matt, i think i know maybe what you mean: if i save a matplotlib figure as eps and then use pstoedit for further processing with xfig, the

Re: [Matplotlib-users] modifying colorbar ticklabels

2010-01-20 Thread Sebastian Busch
Mario Mech wrote: > ... > #-- > import numpy as np > from matplotlib import pyplot,mpl > > x = np.arange(10) > y = np.arange(25) > z = np.floor(10*np.random.random((25,10))) > > pyplot.contourf(x,y,z) > > cb = pyplot.colorbar() > > for j in cb.ax.get_yticklabels(): >print(j) > # >

Re: [Matplotlib-users] range for log scale

2009-09-20 Thread Sebastian Busch
Janwillem van Dijk wrote: > Is it possible to have in Matplotlib.pyplot a log (base 10) scale that > does go from xmin to xmax where xmin and xmax are not powers of 10 ... yes. best regards, sebastian. signature.asc Description: OpenPGP digital signature --

Re: [Matplotlib-users] grid on log-plots

2009-09-07 Thread Sebastian Busch
jihi wrote: > ... can anybody tell me how to get gridlines in a logarithmic plot? ... from matplotlib.pyplot import * plot([1,10,100],[1,10,100]) grid() yscale('log') xscale('log') works here. best, sebastian. signature.asc Description: OpenPGP digital signature -

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Sebastian Busch
Dr. Phillip M. Feldman wrote: > Having to hit Enter is not a major problem, but I'm still not getting > anything displayed. i guess that might be because the "show" command before the loop blocks the program. you can omit the line with "show" or start ipython with ipython -pylab both versions wor

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Sebastian Busch
finally... Sebastian Busch wrote: > ... > it does not crash (the version with '\\' does) but does not produce a > line break, either... text(0.5, 0.5, 'a \n b') works. signature.asc Descripti

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Sebastian Busch
Darren Dale wrote: >> the example >> >> from matplotlib.pyplot import * >> text(0.5, 0.5, r'a \\ b') >> savefig('test.eps') >> >> runs without error here -- and latex is calling pdftex: > > ... cup of coffee. ... the example was not fair though as it wasn't using latex... this one is now: from

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Sebastian Busch
Darren Dale wrote: > On Wed, Aug 12, 2009 at 7:13 AM, D2Hitman wrote: >> Is it a problem that it is using pdftex instead of pslatex? > Yes. i don't think so. the example from matplotlib.pyplot import * text(0.5, 0.5, r'a \\ b') savefig('test.eps') runs without error here -- and latex is callin

Re: [Matplotlib-users] histograms : xmax

2009-07-09 Thread Sebastian Busch
hey there! Pau wrote: > ... > 0.00e+00 1.00e-04 81039 > 1.00e-04 2.00e-04 4472 > 2.00e-04 3.00e-04 2033 > ... > > The bins are given by the two first number columns. > > For instance, the first bin is from 0.00e+00 to 1.00e-04 and has the > number of data 81039 hey pau! i do not unders

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Sebastian Busch
> Pau wrote: >> ... >> MODE: 0.00e+00 - 1.00e-04 >> >> (2226):** >>1: 1.00e-04 - 2.00e-04 ( 482):* >>2: 2.00e-04 - 3.00e-04 ( 273):

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Sebastian Busch
Pau wrote: > ... > 2009/7/5 Gökhan SEVER : >> On Sun, Jul 5, 2009 at 3:41 PM, Pau wrote: >>> ... >>> Traceback (most recent call last): >>> File "./prova.py", line 14, in >>>y.append(int(line.split('(')[1].split(')

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Sebastian Busch
Pau wrote: > ... > MODE: 0.00e+00 - 1.00e-04 > (2226):** >1: 1.00e-04 - 2.00e-04 ( 482):* >2: 2.00e-04 - 3.00e-04 ( 273): >3: 3.00e-04 - 4.00e-04 ( 173):**

[Matplotlib-users] xlabels / ylabels as (non-math) text for pstoedit

2009-06-14 Thread Sebastian Busch
Hey everyone, this is more a how-to / feature request than a question... Normally, my workflow for embedding images in LaTeX is as follows: 1) produce ps-file 2) use pstoedit (xfig) to separate text/math (LaTeX-typesettable) from the image 3) save as pdf_t and pdf, respectively 4) \input this in

Re: [Matplotlib-users] matplotlibrc customizing

2009-06-09 Thread Sebastian Busch
Ulrich vor dem Esche wrote: > ... > #xtick.labelsize : 14 (from '12') > #xtick.direction : out (from 'in') > > nothing changes ... > I must have missed something very basic.. I guess that would be the "#" which declares everything behind as a comment. Does it work when you remove the

Re: [Matplotlib-users] Beginning Python Visualization??

2009-06-08 Thread Sebastian Busch
Esmail wrote: > ... > By the way, any idea how different the MayaVi interface is? I understand that > matplotlib doesn't do 3D plots and I may want to plot some. > ... Hey Esmail, there was the possibility for 3D plots in matplotlib: http://www.scipy.org/Cookbook/Matplotlib/mplot3D however, the

Re: [Matplotlib-users] one data set, two y axis scales

2009-06-06 Thread Sebastian Busch
Jae-Joon Lee wrote: > ... > def Tc(Tf): return (5./9.)*(Tf-32) > > ax1 = subplot(111) # y-axis in F > ax2 = twinx() # y-axis in C > > def update_ax2(ax1): > y1, y2 = ax1.get_ylim() > ax2.set_ylim(Tc(y1), Tc(y2)) > > # automatically update ylim of ax2 when ylim of ax1 changes. > ax1.callb

Re: [Matplotlib-users] EMF export doesn't work

2009-05-22 Thread Sebastian Busch
Thomas Pfaff wrote: > ... ImageMagick just puts a bitmap representation of the > image into the EMF-file ... I want ... vectors, though. hey thomas! i see. perhaps xfig could then help you, it has an export to emf feature (and can import ps files, see for example http://www.thamnos.de/computer-co

Re: [Matplotlib-users] EMF export doesn't work

2009-05-19 Thread Sebastian Busch
Thomas Pfaff wrote: > ... EMF format. ... no converter on the market to properly > convert any other vector format matplotlib can produce to EMF. ... hey thomas! what about convert from imagemagick? "convert test.ps test.emf" gives some output -- if this is indeed a correct emf file i cannot tell

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Sebastian Busch
Armin Moser wrote: > Sebastian Busch wrote: >> ... >> array([list(a[i,:i])+list(b[i,i:]) for i in range(a.shape[0])]) > It seems that I did not understand what you tried to reach. > ... Sorry. I wanted to do the same as Matthias -- taking his example: = from sci

Re: [Matplotlib-users] contour overlapping

2009-05-13 Thread Sebastian Busch
Matthias Michler wrote: > ... > for i in xrange(len(matrix3[:, 0])): # all rows > for j in xrange(len(matrix3[0, :])):# all columns > ... if your matrices a and b are rectangular (and i think the "diagonal" makes only sense in this case), you can also say: array([list(a[i,:i])+list(b[i,i:]) f

Re: [Matplotlib-users] problem with usetex & \color

2009-05-12 Thread Sebastian Busch
Hey Matthias! Thanks for working on that! Matthias Michler wrote: > ... I'm not sure that following problem also occurs for Sebastian, ... it does. > ... PS-backend ... the upper part of the b is somehow hidden ... > f.text(0.5, 0.5, r"{\color[rgb]{0,1,0} a } b {\color{blue} $\nu, \mu, \tau$}")

Re: [Matplotlib-users] problem with usetex & \color

2009-05-12 Thread Sebastian Busch
Hey Jae-Joon! Thank you for your answer! Jae-Joon Lee wrote: > ...your example will show you a correct color if you save it as ps... Indeed the ps output is colored! That's great :) > ... describe where you intend to use multi-color text ... OK, you got me -- actually, this was already a hac

[Matplotlib-users] problem with usetex & \color

2009-05-10 Thread Sebastian Busch
Hello everybody! I am experiencing the following problem: when I draw text with usetex enabled and the xcolor package, the result is not colored; however the intermediate steps that I find in .../tex.cache still are! The problem occurs with: = from matplotlib import rc from pylab import fig

Re: [Matplotlib-users] How to clean memory after plots ?

2006-12-21 Thread Sebastian Busch
Giorgio Luciano wrote: > ... when I restart the function ... all plots freeze. can you give an example? In [1]: from pylab import * In [2]: def f(x): ...: return 2*x ...: In [8]: plot f(array(range(10))) --> plot(f(array(range(10 Out[8]: [] In [9]: show --> show() In [10