Darren Dale | 1 May 16:42
Picon
Favicon

Re: Embedding matplotlib in Qt using Designer

Hi Glenn,

On Wednesday 30 April 2008 04:32:51 am G Jones wrote:
> Hello,
> I have decided to switch to the QtAgg backend because the Designer
> software is very appealing. I succeeded in adding a custom widget
> representing the FigureCanvasQTAgg, but when I compile the ui file, I
> see that it tries to instantiate it as FigureCanvasQTAgg(Parent) where
> Parent is the parent widget, which seems to be the standard format for
> instantiating widgets. However, FigureCanvasQTAgg expects a figure as
> an argument.
> I have seen this tutorial:
> http://www.scipy.org/Cookbook/Matplotlib/Qt_with_IPython_and_Designer
> which suggests making a MatplotlibWidget to wrap the Canvas and set
> everything up including the parent. I have written a version of this
> for Qt4, but this seems like something that should be included in the
> Qt4 backends. Any plans on adding this? I'd be happy to contribute.
> Attached is my initial version.

I'm sorry I didn't respond before now, I've been swamped at work.

I agree that this would be a useful addition to matplotlib. I had been 
thinking myself about whether to invest some time to develop some standard 
widgets. This is a good place to start, I'll commit a modified version 
sometime in the next week (it should respect rcParams, for example), but I'll 
need some instructions on how to make Designer use the plugin. Would you 
please consider writing a brief instruction that could be included in the 
backend_qt4agg source?

Thanks for the submission,
(Continue reading)

Georg Holzmann | 1 May 16:50
Picon

logarithmic errorbar plot

Hallo!

Is there any possibility to use a logarithmic errorbar plot ?
I want to draw my values as with loglog, but additionally add the 
variance to the data points as with yerr in errorbar.

Or is it maybe better to add the variance manually in a loglog plot - is 
this possible ?

Thanks for any hints,
LG
Georg

PS:
I also found this unanswered post about the same topic: 
http://www.nabble.com/semilogx-and-errorbar-tt5182429.html#a5182429

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Eric Firing | 1 May 19:32
Favicon
Gravatar

Re: logarithmic errorbar plot

Georg,

See errorbar_demo.py in the examples directory.  The last example sets 
the y-axis to a log scale; it should also work if you use the same 
method to set both scales to log, so it would be like this:

ax = subplot(111)
ax.set_xscale('log')
ax.set_yscale('log')
errorbar(t, s+2, e, f, fmt='o')

You may need to be careful to keep all values, including errorbar 
limits, positive.

Eric

Georg Holzmann wrote:
> Hallo!
> 
> Is there any possibility to use a logarithmic errorbar plot ?
> I want to draw my values as with loglog, but additionally add the 
> variance to the data points as with yerr in errorbar.
> 
> Or is it maybe better to add the variance manually in a loglog plot - is 
> this possible ?
> 
> Thanks for any hints,
> LG
> Georg
> 
(Continue reading)

Xavier Gnata | 1 May 20:17
Picon
Gravatar

ttconv/truetype.h compile error using gcc-4.3

Hi,

Using gcc-4.3 I get this error :

tconv/truetype.h:50: error: ISO C++ forbids declaration of ‘FILE’ with 
no type

#include <stdio.h> is missing.

Xavier

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Michael Droettboom | 1 May 20:24

Re: ttconv/truetype.h compile error using gcc-4.3

Thanks.  Fixed on trunk (r5102) and 0.91.x maintenance branch (r5101).

Cheers,
Mike

Xavier Gnata wrote:
> Hi,
>
> Using gcc-4.3 I get this error :
>
> tconv/truetype.h:50: error: ISO C++ forbids declaration of ‘FILE’ with 
> no type
>
> #include <stdio.h> is missing.
>
> Xavier
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

--

-- 
Michael Droettboom
(Continue reading)

Georg Holzmann | 1 May 22:33
Picon

Re: logarithmic errorbar plot

Many thanks !

LG
Georg

Eric Firing schrieb:
> Georg,
> 
> See errorbar_demo.py in the examples directory.  The last example sets 
> the y-axis to a log scale; it should also work if you use the same 
> method to set both scales to log, so it would be like this:
> 
> ax = subplot(111)
> ax.set_xscale('log')
> ax.set_yscale('log')
> errorbar(t, s+2, e, f, fmt='o')
> 
> You may need to be careful to keep all values, including errorbar 
> limits, positive.
> 
> Eric
> 
> 
> Georg Holzmann wrote:
>> Hallo!
>>
>> Is there any possibility to use a logarithmic errorbar plot ?
>> I want to draw my values as with loglog, but additionally add the 
>> variance to the data points as with yerr in errorbar.
>>
(Continue reading)

Michael Hearne | 1 May 23:32
Picon
Favicon

plot_date and legend

I'm noticing strange behavior with the legend function when used in  
combination with matplotlib. If I do the following:

import datetime
from pylab import *
date1 = datetime.date( 1952, 1, 1 )
date2 = datetime.date( 2004, 4, 12 )
delta = datetime.timedelta(days=100)
dates = drange(date1, date2, delta)
s1 = rand(len(dates))
plot_date(dates, s1,'r.')
hold(True)
s2 = rand(len(dates))
plot_date(dates, s2,'bo')
legend(('s1','s2'))

The resulting legend shows the symbols twice (two little red dots and  
two blue ones).  Does anyone else get this, and if so, do you know  
what the problem is?

--Mike

------------------------------------------------------
Michael Hearne
mhearne@...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
(Continue reading)

Michael Hearne | 1 May 23:36
Picon
Favicon

Re: plot_date and legend

Contents of matplotlib.__version__"
'0.98pre'

My Matplotlib is from the SciPy SuperPack for Mac OS X  from http://macinscience.org/?page_id=6
On May 1, 2008, at 3:32 PM, Michael Hearne wrote:

> I'm noticing strange behavior with the legend function when used in  
> combination with matplotlib. If I do the following:
>
> import datetime
> from pylab import *
> date1 = datetime.date( 1952, 1, 1 )
> date2 = datetime.date( 2004, 4, 12 )
> delta = datetime.timedelta(days=100)
> dates = drange(date1, date2, delta)
> s1 = rand(len(dates))
> plot_date(dates, s1,'r.')
> hold(True)
> s2 = rand(len(dates))
> plot_date(dates, s2,'bo')
> legend(('s1','s2'))
>
> The resulting legend shows the symbols twice (two little red dots  
> and two blue ones).  Does anyone else get this, and if so, do you  
> know what the problem is?
>
> --Mike
>
>
>
(Continue reading)

Zoho Vignochi | 2 May 00:00
Picon

set_colors() not working for line collection

Hello:

I have a script in which I have been using plot to plot numerous lines on 
the same graph. I recently wanted to see how Line Collections work so I 
tried porting it over. Everything successful except I can't seem to get 
each line to be a different color. Here is the relevant section:

# Make a list of colors cycling through the rgbcmyk series.
	colors = [colorConverter.to_rgba(c) for c in 
('r','g','b','c','y','m','k')]
	
	fig = plt.figure()
	ax = fig.add_subplot(1,1,1)
	lines = collections.LineCollection([zip(L_range, item) for item 
in a_steady])
	lines.set_array(L_range)
	lines.set_color(colors)
	ax.add_collection(lines, autolim=True)
	
However every line is blue. Any ideas?

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Zoho Vignochi | 2 May 00:07
Picon

Re: set_colors() not working for line collection

On Thu, 01 May 2008 22:00:33 +0000, Zoho Vignochi wrote:

> Hello:
> 
> I have a script in which I have been using plot to plot numerous lines
> on the same graph. I recently wanted to see how Line Collections work so
> I tried porting it over. Everything successful except I can't seem to
> get each line to be a different color. Here is the relevant section:
> 
> # Make a list of colors cycling through the rgbcmyk series.
> 	colors = [colorConverter.to_rgba(c) for c in
> ('r','g','b','c','y','m','k')]
> 	
> 	fig = plt.figure()
> 	ax = fig.add_subplot(1,1,1)
> 	lines = collections.LineCollection([zip(L_range, item) for item
> in a_steady])
> 	lines.set_array(L_range)
> 	lines.set_color(colors)
> 	ax.add_collection(lines, autolim=True)
> 	
> However every line is blue. Any ideas?
> 
 I should mention my import lines:

import numpy as np
from numpy import sum, zeros, less, where
import scipy as sp

import matplotlib.pyplot as plt
(Continue reading)


Gmane