Re: [Matplotlib-users] mpl_toolkits axes grid

2013-03-16 Thread Christian Meesters
Hi David and Ben and everybody reading along,

Apparently I did not phrase my question too well.

To clarify:

I would like to have some 'subplots' with a width proportional to
the amount of (equally spaced) data points.

It seems to me that gridspec (http://matplotlib.org/users/gridspec.html)
is just the tool I need - with this I only need to calculate the
relative sizes of my subplots, but that's easy. Alas, I did not discover
it until tonight.

Thanks a lot for your help!
Christian



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mpl_toolkits axes grid

2013-03-15 Thread Christian Meesters
Hi,It is quite some time ago since I was intensively using MPL. Perhaps I will not get the terminology right anymore. And now I hope to get some pointer for this particular problem:I would like to arange some line plots using a grid from left to right in a single plot / figure instance. Each of these plots is created from vectors (numpy arrays) of a different length. If I would place subplots of equal size to place these individual plots from left to right, all will appear with a different stretch/squeeze.My question now is: Is there a way to place different subplots of different sizes automatically? For all my plots I will encounter different number of individual line plots of different size.My approach so far (pseudocode):from mpl_toolkits.axes_grid1 import Gridimport pylab as pltfig = plt.figure(1, (5.5, 3.5))grid = Grid(fig, 111, # similar to subplot(111) nrows_ncols = (1, number_of_subplots), axes_pad = 0.1, add_all=True, label_mode = L, )for index in xrange(number_of_subplots): grid[index].???And now I just do not know how to get any further? How will I get the necessary extension for each subfigure/plot? Which is the most efficient way to accomplish all this? Should I import a different class, other than Grid?TIARegards,Christian

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] state, plotting 3D? semilog axis possible?

2011-04-14 Thread Christian Meesters
Hi,

I've lost touch with the state of mpl and starting to use it again. Apparently 
some of the gallery examples in 3D aren't working, but I think I found a 
workaround.

However, is there a way to get 3D bar charts with semilog style (e.g. 
logarithmic x-axis?)

Right now, I have:

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

snip
prepare data
/snip
for size, val, timepoint in zip(tdata[::2], tdata[1::2], timepoints):
cs = ['b'] * len(size)
ax.bar(size, val, zs = timepoint, zdir = 'y', color=cs, alpha=0.8)

as modified from one example I've found. Looks fine, except that the x-axis has 
to be logarithmic to make sense (data were sampled this way).

TIA,
Christian


-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] rotating markers

2010-11-10 Thread Christian Meesters
Hi,

Honestly, I neglected my mpl skills lately, so I don't know whether docs
on this topic are available, but I couldn't find them either.

I would like to create a forest plot using horizontal errorbars.
Currently my marker is simply 'kd' in pylab.errorbar, where 'd' is
similar to LaTeX's \blacklozenge. 

Is there a way to rotate the marker such that long cross section is
horizontal (rotation by 90 degree) and not vertical anymore?

TIA
Christian


--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] rotating markers

2010-11-10 Thread Christian Meesters
Thanks! Alas, this raises a NotImplementedError and although I'm still
running version 0.99 of mpl, it seems like this is not yet implemented
in the 'errorbar'-function to handle this - or am I mistaken?

I won't find the time to implement this.

Anyway, thanks again for your help. It would have been nice, but I can
live without it.

Christian

I won't find the time to implement this. 

On Wed, 2010-11-10 at 09:18 -0600, Benjamin Root wrote:
 On Wed, Nov 10, 2010 at 7:44 AM, Christian Meesters
 meest...@imbie.uni-bonn.de wrote:
 Hi,
 
 Honestly, I neglected my mpl skills lately, so I don't know
 whether docs
 on this topic are available, but I couldn't find them either.
 
 I would like to create a forest plot using horizontal
 errorbars.
 Currently my marker is simply 'kd' in pylab.errorbar, where
 'd' is
 similar to LaTeX's \blacklozenge.
 
 Is there a way to rotate the marker such that long cross
 section is
 horizontal (rotation by 90 degree) and not vertical anymore?
 
 TIA
 Christian
 
 
 
 Christian,
 
 Looking through the code for drawing the thin diamond, I think you
 might be able to get what you want by specifying the fillstyle.  It
 appears that different rotations are applied when the fillstyle is set
 to one of bottom, top, or left.  full is another available
 fillstyle, which appears to take a unit rectangle and rotates that 45
 degrees.
 
 Probably your best bet would be the 'top' fillstyle, which looks like
 it does a 90 degree rotation.
 
 I hope this helps,
 Ben Root
 
 



--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] differnet colormaps with pcolormesh

2009-11-11 Thread Christian Meesters
Hi,

Is there a way to somehow squeeze two datasets with two different color
maps into one pcolormesh? Say one dataset occupies one triangle (e. g.
numpy.triu(dataset1, 1)) and the second dataset a different area (e. g.
numpy.tril(dataset2, -1)) and then paste the two datasets in one
pcolormesh (e.g. pylab.pcolormesh(numpy.triu(dataset1, 1) +
numpy.tril(dataset2, -1)) ). This will obviously share one colormap. But
does anybody know a trick to use two different ones?

TIA
Christian

PS Forgot to thank Eric Firing for his tip last time I asked. Thank you
Eric: You solved my problem!


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] zap symbols

2009-10-21 Thread Christian Meesters
Hi,

Does anyone provide a script / patch to create zap symbols (e.g. like
http://home.gna.org/pychart/doc/module-coord.html#module-coord ) to
break an axis?

TIA
Christian


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] all fonts to sans-serif?

2009-10-18 Thread Christian Meesters
Thanks Darren,

Then, I guess, the easiest solution is to either use to set all tick
labels manually or to just use serif fonts ;-).

Christian

On Fri, 2009-10-16 at 09:57 -0400, Darren Dale wrote:
 On Thu, Oct 15, 2009 at 10:38 AM, Christian Meesters
 meest...@imbie.uni-bonn.de wrote:
  Hi,
 
  I'd like to have all sub-fonts (labels, tick labels, text) sans-serif
  for a series of plots per default. However the appropriate settings
  in .matplotlibrc apparently don't work and this also does not work:
 
  import matplotlib as mpl
  mpl.rcParams['text.usetex'] = True
  mpl.rcParams['font.family'] = 'sans-serif'
  mpl.rcParams['font.sans-serif'] = 'Bitstream Vera Sans'
 
 usetex uses latex's math mode for rendering ticklabels, and mathmode
 is rendered in serif. We tried supporting sans-serif once, and it
 turned out to be too complicated to cover all the corner cases. I
 think there may be a latex package that can be loaded for sans-serif
 math mode, but I don't remember what it is called. You could add that
 package invocation to your text.latex.preamble, but please note that
 text.latex.preamble is not officially supported (because it is so
 flexible, we don't want to troubleshoot latex issues on this list.)
 
 Darren


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] bar plot errorbars

2009-10-18 Thread Christian Meesters
Hi,

Is there a way to have errorbars in a bar plot going in just one
direction? E. g. like that

   -
   |
+-+
| |

instead of

   -
   |
+-+
|  |  |
   -

?

TIA
Christian


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] all fonts to sans-serif?

2009-10-15 Thread Christian Meesters
Hi,

I'd like to have all sub-fonts (labels, tick labels, text) sans-serif
for a series of plots per default. However the appropriate settings
in .matplotlibrc apparently don't work and this also does not work:

import matplotlib as mpl
mpl.rcParams['text.usetex'] = True
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = 'Bitstream Vera Sans'

Any ideas?

TIA
Christian



--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plot of 2D array without masked values?

2009-09-21 Thread Christian Meesters
Hi,

I'm plotting 2D-ndarrays with pylab.pcolor(). The data contain masked
values and it can happen that entire rows or columns hold only masked
values. Is there a build-in way to omitted such rows/columns? Currently
I'm removing the labels in x and y and the row/columns by hand.

TIA
Christian


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] pcolormesh - question

2009-09-06 Thread Christian Meesters
Hi,

Let me reformulate my question: Is there a way to put ticklabels not
beside, but between ticks (centered between)?

TIA
Christian

On Fri, 2009-09-04 at 10:53 +0200, Christian Meesters wrote:
 Hi,
 
 I have the following code:
 
 pylab.pcolormesh(data, multialignment='center')
 xlocs, xlabels = pylab.xticks(range(0, data.shape[1]+1), xlabels)
 pylab.setp(xlabels, 'rotation', 70)
 pylab.colorbar()
 pylab.show()
 
 where data is a 2D numpy array containing some masked values and
 'xlabels' is - originally - a list of strings for the xlabels.
 
 This gives me two problems:
 - The column on the right is shown as blank, although this column has
 valid data and
 - the labels aren't placed below the center of a field, but below the
 xticks. I would like to have them centered, below a field, as the ticks
 are merely separators and not associated with any unit.
 
 TIA
 Christian
 
 
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with 
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] pcolormesh - question

2009-09-04 Thread Christian Meesters
Hi,

I have the following code:

pylab.pcolormesh(data, multialignment='center')
xlocs, xlabels = pylab.xticks(range(0, data.shape[1]+1), xlabels)
pylab.setp(xlabels, 'rotation', 70)
pylab.colorbar()
pylab.show()

where data is a 2D numpy array containing some masked values and
'xlabels' is - originally - a list of strings for the xlabels.

This gives me two problems:
- The column on the right is shown as blank, although this column has
valid data and
- the labels aren't placed below the center of a field, but below the
xticks. I would like to have them centered, below a field, as the ticks
are merely separators and not associated with any unit.

TIA
Christian


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] heatmap and masked values

2009-08-31 Thread Christian Meesters
Jeff, that's a good point. I remember ...

On Thu, 2009-08-27 at 07:54 -0600, Jeff Whitaker wrote:
 Christian Meesters wrote:
  Christian:  That should work, if you created the masked array 
  correctly.  Why are you creating the mask with data=='NA'?  I suspect 
  that this always evaluates to False, so you don't get a mask.  You 
  probably want to check for a numeric value, not a string.  For example:
  
  Thanks a lot, Jeff!
 
  Yes, the non-numerical comparison was indeed causing problems - although
  I don't understand why.
 
  However, I can easily inject numerical non-sense values into the array.
  As to the 'NA': The data are an R output file. As I don't like R too
  much, I'm falling back to Python.
 
  Christian
 

 Christian:  What type of array is that (data.dtype)?  I don't see how a 
 numpy array can have values equal to 'NA', unless it is an array of 
 strings.  In that case, it would not be plottable anyway. 
 
 -Jeff


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] heatmap and masked values

2009-08-27 Thread Christian Meesters
Hi,

I have a 2D masked array, created like:

import numpy as np
data = np.ma.array(data, mask=[data == 'NA'])

which I would like to plot as a heatmap.

import pylab

pylab.pcolor(data)
or
pylab.pcolormesh(data)

Well, it works with any array, but not if masked values are in there.
Can somebody supply me with a snippet, as I apparently don't get the
relevant piece in the docs (or did not find it ;-) ).

TIA
Christian


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] heatmap and masked values

2009-08-27 Thread Christian Meesters

 Christian:  That should work, if you created the masked array 
 correctly.  Why are you creating the mask with data=='NA'?  I suspect 
 that this always evaluates to False, so you don't get a mask.  You 
 probably want to check for a numeric value, not a string.  For example:
Thanks a lot, Jeff!

Yes, the non-numerical comparison was indeed causing problems - although
I don't understand why.

However, I can easily inject numerical non-sense values into the array.
As to the 'NA': The data are an R output file. As I don't like R too
much, I'm falling back to Python.

Christian


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problem using LineCollection

2007-11-15 Thread Christian Meesters
Hi,

Sorry, if this has been brought up before, but I missed a while reading
the list.

When I updated my system lately, I also installed the current version of
mpl (0.90.1) and that gave me a DeprecationWarning that I should use
LineCollection now to get my horizontal lines. Well, I didn't figure out
how to do that until now.
(NB I have an own wxpython app which makes heavy use of mpl and mostly
uses subplot instances.)

Well, this code snippet 

from pylab import *
from matplotlib.collections import LineCollection

x = subplot(211)
x.add_collection(LineCollection([(0,0)]))

gives the following Traceback:

Exception in Tkinter callback
Traceback (most recent call last):
  File lib-tk/Tkinter.py, line 1406, in __call__
return self.func(*args)
  File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py,
line 151, in resize
self.show()
  File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py,
line 154, in draw
FigureCanvasAgg.draw(self)
  File
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py,
line 392, in draw
self.figure.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/figure.py, line
601, in draw
for a in self.axes: a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/axes.py, line 1286,
in draw
a.draw(renderer)
  File /usr/lib/python2.5/site-packages/matplotlib/collections.py,
line 700, in draw
transoffset)
TypeError: CXX : Error creating object of type
N2Py7SeqBaseINS_6ObjectEEE

The traceback is independent of the backend used, same for wxagg at
least.

Guess, I'm missing something stupid. Can somebody enlighten me?

Thanks,
Christian


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] error in cookbook concerning colorbars?

2007-09-11 Thread Christian Meesters
Hi,

Am I right if I presume that line No. 4 in the second listing in
http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps should read
(0.5, 0.1, 0.7) in order to match the description? But then, of course
the example plot would look different.

I hesitate to change what I don't fully understand ...

Christian

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fitting a curve

2007-08-31 Thread Christian Meesters
Hoi,

There is still MPL's polyfit function and I have to admit that Steve
Schmerler's solution looks better that mine, but I've pasted a quick 
dirty solution here:
http://www.python-forum.de/topic-8363.html
It shows the use of polyfit as well as (almost) Steve's approach.

Further examples on linear regression and polynomal regression can be
found in http://matplotlib.sourceforge.net/users_guide_0.90.0.pdf

Also, you might want to have a closer look on the scipy web page:
http://www.scipy.org/ .

Cheers
Christian

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] hatching background

2007-08-31 Thread Christian Meesters
Hi,

is it somehow possible to have a hatch in parts of the background, which
would achieve something like this pseudo-parameter to axvspan
pylab.axvspan(2, 10,  hatch='//')?

TIA
Christian

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex, Labels and PDF

2007-07-24 Thread Christian Meesters
Hoi Peter,

 $\rm{some label text} (\mu V)$ becomes somelabeltext\muV
You could try
r$\rm{some\ label\ text} (\mu V)$
instead. (Note the backslashes and the 'raw' r in front of the string.)
This way the string should be interpreted fine. You can use the '\ ' to
force a space, but whether it's necessary depends on the string you want
to display, of course.

Possible statements in the head of your programs might be:
from matplotlib import rcParams
rcParams['text.fontname'] = 'cmr10'
rcParams['lines.markerfacecolor'] = None
from matplotlib import rc
rc('text', usetex=True)
rc('axes', hold=True)

(From a current program of mine. Of course, some statements have nothing
to do with your problem, but they might illustrate some options you
have.)

The wiki/Cookbook has some info (on pitfalls, too):
http://www.scipy.org/Cookbook/Matplotlib/UsingTex
http://www.scipy.org/Cookbook/Matplotlib/LaTeX_Examples

You probably know the mathtex module:
http://matplotlib.sourceforge.net/matplotlib.mathtext.html
the wheeler_demo:
http://matplotlib.sourceforge.net/screenshots/wheeler_demo.py
and the tex_demo:
http://matplotlib.sourceforge.net/screenshots/tex_demo.py
?

As for your eps2pdf-problem:
I don't know any straightforward solution (one that always gives a
pleasant output) for it, but had a similar problem lately. It seems that
MPLs eps-output is not well read in by many viewers / converters (that
statement correct?). Correcting the eps with eps2eps or trying to
convert the eps with some other software did not work well for me. My
solution was:
Producing plots in formats other then eps/ps (e. g. png), with
sufficient resolution and converting to the format the publisher wanted
with other software (e.g. gimp or see what's on our terminal
server ;-) ).
Currently I'm only using eps figures for import into LaTeX - works fine.

HTH
Christian



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] stretching letters in plots

2007-07-05 Thread Christian Meesters
Hi,

Is there a way to stretch letters like in this example
http://weblogo.berkeley.edu/examples.html using mpl? 
I don't exactly want to reproduce sequence logos, but I would like to
'scale' a letter arbitrarily in height, changing its color and keeping
it's width fixed.
I didn't see things like that in mpl, yet. But I thought if somebody
knows a way, I'd rather use the tool I like.

Christian

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plotting only some error bars

2007-01-05 Thread Christian Meesters
Hoi,

For some plot I'd like to display a dotted line (style = 'k.-') with an error 
bar at only every 30th point or so. The error values in this case are 
scalars.
Of course, I could produce a slice like mydata[::jumper] and plot these above 
the first plot, but this seems a bit akward. Anyone with a better solution 
out there?

TIA
Christian

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] display problem of eps files in Adobe Photoshop

2006-10-26 Thread Christian Meesters
Hi,

I'm producing eps files using matplotlib (current version) on a linux box with 
SuSE 10.0. Whenever I view those files with a standard viewer on that machine 
or try to embed it in a latex document there is no problem.

Now I've copied these files on a Windows machine and I opened them in Adobe 
Photoshop (9.0 CS2) and no numbers and no text is visible - not in the 
legends, the labels, title, etc and regardless of whether I'm producing these 
digits / letters with or without TeX.

Is this a known problem? Any workaround known?

TIA
Regards,
Christian

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plot x y value(x,y)

2006-10-13 Thread Christian Meesters
Hi,

No stupid question at all! I don't really understand your question, but it 
sounds to me like a scatter plot is what you want. In that case, just have a 
look at the scatter plot demos on the web page (- screenshots) or in the 
example files.

HTH
Christian

On Friday 13 October 2006 14:25, Hanno Klemm wrote:
 Hi,

 this is probably a stupid question, but somehow I just can't figure
 out how to do it. I have data given in an array with entries:

 x y data(x,y)

 and thus of shape (#data points, 3)

 what is the easiest way with mpl to plot these data points, susch that
 they are located at x,y and colored according to data(xy)?

 Thanks for any pointers,
 Hanno

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plot x y value(x,y)

2006-10-13 Thread Christian Meesters
I think Louis' idea of using contour plots for your problem is not that bad. 
It depends, of course, on the actual meaning of your data ...

Assume you understand German? Have a look here: 
http://www.python-forum.de/topic-5294.html

Christian

On Friday 13 October 2006 15:19, Hanno Klemm wrote:
 Hi Louis,

 sorry for being unclear. What I have is a list of data points given in
 the format

 x y value

 so my array looks like

 x_1, y_1, v_1
 x_2, y_2, v_2,

 etc.

 Now I want to plot a point at (x_i, y_i) and assign to it a color
 according to v_i. The problem is, that the values at x and y are given
 and are not calculated.

 Christian's suggestion with a scatter plot works fine for me, but if
 there are other possibilities I'm always keen to learn something.

 Hope this clarifies matters.

 Best regards,
 Hanno

 Louis Pecora [EMAIL PROTECTED] said:
  Christian Meesters wrote:
   Hi,
  
   No stupid question at all! I don't really understand your

 question, but it

   sounds to me like a scatter plot is what you want. In that case,

 just have a

   look at the scatter plot demos on the web page (- screenshots) or

 in the

   example files.
  
   HTH
   Christian
 
  Actually sounds more like a surface or contour plot.  You have x, y,

 and

  z where z=function of (x,y).  I thought there was a contour call in
  matplotlib.  I'll look.
 
  --
  Cheers,
 
  Lou Pecora
 
  Code 6362
  Naval Research Lab
  Washington, DC  20375
  USA
  Ph:  +202-767-6002
  email:  [EMAIL PROTECTED]

 -

  Using Tomcat but need to do more? Need to support web services,

 security?

  Get stuff done quickly with pre-integrated technology to make your

 job easier

  Download IBM WebSphere Application Server v.1.0.1 based on Apache

 Geronimo

  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Matplotlib-users mailing list
  Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] eps file format

2006-10-09 Thread Christian Meesters
On Monday 02 October 2006 21:51, Mark Bakker wrote:
 What I don't understand is why we need previews at all?
 Is this because Microsoft software cannot display an eps file?
 Why not? Isn't that one of the easiest drivers to write?
 Are they not adding eps format out of spite?
 Mark
Sorry for replying so late - I was to a meeting for a few days.

As to your question: I have no idea WHY previews are needed. I only know they 
are required by some publishers if you submit a paper to them (which was my 
original reason for asking).

HTH
Christian

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] line styles with hollow circles?

2006-09-29 Thread Christian Meesters
On Friday 29 September 2006 07:50, Jouni K Seppanen wrote:
 Stefan van der Walt [EMAIL PROTECTED] writes:
  plot(x,y,'o',markerfacecolor='w')

 This makes circles filled with white. If you want circles that don't
 obscure whatever is behind them, use markerfacecolor=None.
Jouni, Bill, thank you both for the warning / reminder. I guess Stefan's 
snippet was merely meant as an example to stimulate my memory :-).Everybody 
seeing such an example will start to tinker around and try several things - 
as I did.

Cheers
Christian

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] eps file format

2006-09-28 Thread Christian Meesters
Thanks, John and Alan,

That was fast!

 As for the fonts, yes, you can control this with rc.
Sure, but what about the latex rendered parts? (I wonder whether it actually 
matters, but I'd like to be sure, because there so little time left ...)

 On Thu, 28 Sep 2006, Christian Meesters apparently wrote:
  - it should include a 8bit preview/header at a resolution of 72dpi - no
  idea how to generate this

 I think you can use
 http://www.cs.wisc.edu/~ghost/gsview/epstool.htm
 but do not know what dpi control you'll have.
It works, thanks. The installation is easy. Setting the resolution in dpi can 
be done by giving the flag --dpi resolution. 

Cheers
Christian

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] line styles with hollow circles?

2006-09-28 Thread Christian Meesters
Hi,

I'd like to plot experimental data points with fitted data through it. This 
time best would be to plot hollow circles for the experimental data. Pretty 
much like literal 'o's (except, of course, that passing 'o' results in thick 
circles).
Is this possible somehow?

TIA
Christian

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] eps file format

2006-09-28 Thread Christian Meesters
 As for the preview header, I suspect there arte 3rd part tools that
 can do this (ImageMagick?).  We should be able to do it ourself with
 agg, but it would require someone to dig in and figure out the spec.

 JDH
One last remark on this: Since so many journals demand this, would it be worth 
a feature request? (I don't have the time nor the skills to work on this.) 
One may think of this as one wishes (don't like these publishing companies 
and their demands, either), but matplotlib wants to enable its users to 
produce figures ready for publication, right?

Christian 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] svn build cannot import

2006-09-08 Thread Christian Meesters
Hi,

I you don't need to use svn, you might give this build a try:
http://pythonmac.org/packages/py24-fat/index.html

Christian

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] list troubles

2006-08-07 Thread Christian Meesters
Hi,

Sorry for posting to the list, but I had no clue who to address.

Recently I had some troubles sending emails to the list, for they were bounced 
back with this delivery status notification:

The following message to matplotlib-users@lists.sourceforge.net was 
undeliverable.
The reason for the problem:
5.1.0 - Unknown address error 550-'Postmaster verification failed while 
checking [EMAIL PROTECTED]\n(result of earlier 
verification reused).\nSeveral RFCs state that you are required to have a 
postmaster\nmailbox for each mail domain. This host does not accept 
mail\nfrom domains whose servers reject the postmaster address.\nSender 
verify failed'

What then follows is my entire mail I was going to send.

Unsubscribing / Re-subscribing helped. matplotlib-users is the only list where 
I had such problems, but not the only one using Mailman I'm using.

Could this be a problem with the mailserver I'm using?

My apologies if this is not considered to be of general interest. Please reply 
directly to my address in this case.

TIA
Christian

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] pylab crashes simple wxPython script

2006-06-08 Thread Christian Meesters
On Thursday 08 June 2006 16:19, massimo sandal wrote:
 Brian Blais ha scritto:
  I want to write a wxPython script to pull up pylab plots (in a separate
  window), based on menu or button choices.  The script below crashes with
  a segmentation fault. Am I doing something wrong here?  Is there a
  workaround or fix?

 As far as I know, mixing wxpython and pylab this way is BAD.

 You should better choose between:
 - (1)Launch pylab in a separate thread
 - (2) (What I do) Using WxMPL and embedding a matplotlib plot in a
 wxPanel or wxFrame. You have to use the OO interface to matplotlib.

 m.

Hi,

Agree with massimo. One brief example might help:

import matplotlib
matplotlib.use('WXAgg')
from pylab import gca
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as 
FigureCanvas
from matplotlib.font_manager import fontManager, FontProperties
from matplotlib.figure import Figure
from matplotlib.axes import Subplot
import matplotlib.numerix as numpy
from matplotlib.ticker import LogLocator, MultipleLocator
from matplotlib import rcParams

import wx

snip

class Your_Class(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,None,-1,Your_Title)
snip

self.fig = Figure(figsize=(7,5),dpi=100)
self.axes = self.fig.add_subplot(111)
self.canvas = FigureCanvas(self, -1, self.fig)
self.parent = self.canvas.GetParent()
self.canvas.mpl_connect('motion_notify_event',self.mouse_move)

snip: SomeSizer
SomeSizer.add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW|wx.EXPAND)

#useful method examples:
def OnRefresh(self,event=None):

refreshes the plotting window

self.canvas.draw()
self.toolbar.update()

#then the actual drawing function:
def plot_data(self):

actual plotting function

raw_plot(self) #imported own function, see below
self.toolbar.update() #not necesarry, but might help

def raw_plot(parent):
# note that all meta data / parameters from the parent are accessible !
# e.g. color = parent.color
parent.fig.clear()
a = parent.fig.add_subplot(211)
etc. etc. etc.

Thought this might be helpful to get started. You might want to write things a 
different way, though. Particularly the my application is a bit more than 
just a short script, so feel free to drop anything you don't want.

One last thing: I'd recommend having a look at the matplotlib examples 
('embedding_in_wx*.py').

Cheers,
Christian



___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users