[Matplotlib-users] Asking for help modifying a matplot windrose graphic using Python (:
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=48808831iu=/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 (:
Hi Guilherme On Jul 22, 2013, at 20:54 PM, Guilherme Araújo Martins gami...@globo.com 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=48808831iu=/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 (:
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=48808831iu=/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=48808831iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users