Re: [Matplotlib-users] Matplotlib backend issue

2013-07-22 Thread Sterling Smith

On Jul 20, 2013, at 3:04PM, Tommy Grav wrote:

> On Jul 20, 2013, at 11:19 AM, Michiel de Hoon  wrote:
> 
> Ok, so with a long list of print statements I have tracked it down to 
> the statement
> 
> import matplotlib._png as _png
> 
> in image.py. 

Tommy,

Instead of a lot of print statements, you can use
python -v
if you are starting from a python interpreter.

-Sterling

--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1

2013-07-22 Thread Brian Baughman
Greetings all,

I have this problem now as well. I use a Mac with Canopy installed and it was 
working fine until I recently updated my packages and got the new matplotlib. 
The code which reproduces this error for me is very simple:

{{{
x = scipy.random.normal(0,1,100)

f = figure(num=1)
f.clear()
ax = f.add_subplot(111)
ns,bns,plt0  = ax.hist(x,bins=10,log=True)
plt1 = ax.bar(bns[0:-1],ns,width=bns[1:]-bns[0:-1],color='r',log=True)
draw()
}}}


The code works fine if one comments out the ax.bar usage but fails otherwise. I 
have tried multiple different kwargs or removing the second "log=True" and all 
result in the same TypeError.

Regards,
Brian



On Apr 18, 2013, at 12:42 PM, Michael Droettboom  wrote:

> Can you please provide a complete, minimal and self-contained script 
> that reproduces the error?  The example below has many undefined 
> variables etc.
> 
> Cheers,
> Mike
> 
> On 04/16/2013 07:09 PM, Christophe Pettus wrote:
>> # preamble code collecting data
>> 
>> ind = np.arange(len(table_name))
>> 
>> width = 0.35
>> 
>> fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
>> ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)
>> 
>> ax.set_title('Largest Tables')
>> 
>> ax.set_xlabel('Size (log scale)')
>> 
>> ax.set_xscale('log')
>> ax.grid(True)
>> 
>> ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))
>> 
>> dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', 
>> label='Main Data')  # exception here
>> ibar = ax.barh(ind, index_toast_size, width, left=data_size, 
>> linewidth=0, color='red', label='Toast/Indexes')
>> ax.set_yticks(ind + width/2)
>> ax.set_yticklabels(table_name, fontproperties=xx_small_font)
>> 
>> ax.legend(loc='lower right', prop=x_small_font)
>> 
>> plot.tight_layout()
>> 
>> plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')
>> 
>> plot.close()
> 
> 
> --
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



smime.p7s
Description: S/MIME cryptographic signature
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Asking for help modifying a matplot windrose graphic using Python (:

2013-07-22 Thread Guilherme Araújo Martins
Hello guys.
I'm having a problem with a matplot graphic and I guess it can be easy for
Python experts to solve. Hope I'm not out of topic here.

Basically, I'm using this code...
http://matplotlib.org/examples/pylab_examples/polar_bar.html

... but I want to turn it in something like this graphic over here...
http://www.weathersa.co.za/web/images/articles/windrose.png

You see, where more than one bar pointing the same direction will be put
one over the other (the biggest in the base and the smallest at the top). I
assumed I had to put some function at this part of the code:

bars = ax.bar(theta, radii, width=width, bottom=0.0)

Turning Bottom into a function call somewhat related to the radii (bar
size) if both bars have the same theta (angle). Point is I'm having some
trouble doing that. I'm totally stuck, actually.

If not a complete solution, some tip would be apreciated.

Thank you very much!
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Asking for help modifying a matplot windrose graphic using Python (:

2013-07-22 Thread Jody Klymak
Hi Guilherme

On Jul 22, 2013, at  20:54 PM, Guilherme Araújo Martins  
wrote:

> Basically, I'm using this code...
> http://matplotlib.org/examples/pylab_examples/polar_bar.html
> 
> ... but I want to turn it in something like this graphic over here...
> http://www.weathersa.co.za/web/images/articles/windrose.png
> 
> You see, where more than one bar pointing the same direction will be put one 
> over the other (the biggest in the base and the smallest at the top). I 
> assumed I had to put some function at this part of the code:
> 
> bars = ax.bar(theta, radii, width=width, bottom=0.0)
> 
> Turning Bottom into a function call somewhat related to the radii (bar size) 
> if both bars have the same theta (angle). Point is I'm having some trouble 
> doing that. I'm totally stuck, actually.

For each direction, just plot the largest one first, and the smallest one last 
and set_alpha = 1.

Cheers,   Jody


--
Jody Klymak
http://web.uvic.ca/~jklymak/




--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Asking for help modifying a matplot windrose graphic using Python (:

2013-07-22 Thread Paul Hobson
Guilherme,

Check out my implementation of windroses here:
https://github.com/phobson/python-metar/blob/master/metar/graphics.py#L138


On Mon, Jul 22, 2013 at 11:54 AM, Guilherme Araújo Martins <
gami...@globo.com> wrote:

> Hello guys.
> I'm having a problem with a matplot graphic and I guess it can be easy for
> Python experts to solve. Hope I'm not out of topic here.
>
> Basically, I'm using this code...
> http://matplotlib.org/examples/pylab_examples/polar_bar.html
>
> ... but I want to turn it in something like this graphic over here...
> http://www.weathersa.co.za/web/images/articles/windrose.png
>
> You see, where more than one bar pointing the same direction will be put
> one over the other (the biggest in the base and the smallest at the top). I
> assumed I had to put some function at this part of the code:
>
> bars = ax.bar(theta, radii, width=width, bottom=0.0)
>
> Turning Bottom into a function call somewhat related to the radii (bar
> size) if both bars have the same theta (angle). Point is I'm having some
> trouble doing that. I'm totally stuck, actually.
>
> If not a complete solution, some tip would be apreciated.
>
> Thank you very much!
>
>
> --
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mixed color dashes

2013-07-22 Thread Mark Bakker
Hello List,

I want to make dashes that alternate in color, red, white, blue. Or black,
yellow, red, etc.

I thought I could overlay different dashes (first draw the black, then the
yellow then the red dashes), but the 'dashes' command always starts with a
colored dash. What I need is the opposite, start with a blank, then a dash.
Or have an offset of xx points and then start the dashed line. Does
matplotlib have such a feature?

Thanks,

Mark
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users