How to start when you don't know what to do

Heyya list.

I must admit that my matplotlib-foo is only so so. One of the biggest problems that I face is seeing cool stuff around the net, and thinking, "that's pretty neat, I'd like to copy it." In reality, I have no idea how I would go about creating something like that.

Here's an example: http://imgur.com/JdkR4

Just a little circular histogram thing with some annotations. Obviously, I'd need the annotate command for the words, but what about the arcs? No idea, off hand. So my question is, how do you decode (read: what to think about) figures that you see, and turn them into actual python? Sure I could post on stack exchange or email all you people every time, but I want to be *better* at this. And while some people are going to scoff and reply "that's easy, silly" it's not so for some. I just hate to admit it's me.

Thanks for the advice.

···

--

Steven Boada

Doctoral Student
Dept of Physics and Astronomy
Texas A&M University
boada@...3847...

I do exactly that from time to time (copying a graphic) and I always start looking at the matplotlib gallery (http://matplotlib.org/gallery.html) for what is the most similar figure and starts from here (after removing what is not necessary). Most important is identifying the kind of axis necessary (cartesian, log, polar, ...)

Some examples at: http://www.loria.fr/~rougier/coding/gallery/

Some really nice graphics (but difficult) to try to copy at:

http://www.improving-visualisation.org/visuals

Nicolas

···

On Jan 15, 2013, at 20:52 , Steven Boada wrote:

Heyya list.

I must admit that my matplotlib-foo is only so so. One of the biggest
problems that I face is seeing cool stuff around the net, and thinking,
"that's pretty neat, I'd like to copy it." In reality, I have no idea
how I would go about creating something like that.

Here's an example: http://imgur.com/JdkR4

Just a little circular histogram thing with some annotations. Obviously,
I'd need the annotate command for the words, but what about the arcs? No
idea, off hand. So my question is, how do you decode (read: what to
think about) figures that you see, and turn them into actual python?
Sure I could post on stack exchange or email all you people every time,
but I want to be *better* at this. And while some people are going to
scoff and reply "that's easy, silly" it's not so for some. I just hate
to admit it's me.

Thanks for the advice.

--

Steven Boada

Doctoral Student
Dept of Physics and Astronomy
Texas A&M University
boada@...3847...

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Do you happen to have a really good programmer nearby? I usually do a ton of dumb trial and error for a week, banging my head against the wall, until my super good programmer colleague comes over and goes “goddammit what are you trying to do?”, then in like 2 minutes he shows me where I went wrong. But I find that I learn the most after a lot of dumb trial and error, then someone who knows what they are doing shows me.

···

On Tue, Jan 15, 2013 at 2:09 PM, Nicolas Rougier <Nicolas.Rougier@…3782…> wrote:

I do exactly that from time to time (copying a graphic) and I always start looking at the matplotlib gallery (http://matplotlib.org/gallery.html) for what is the most similar figure and starts from here (after removing what is not necessary). Most important is identifying the kind of axis necessary (cartesian, log, polar, …)

Some examples at: http://www.loria.fr/~rougier/coding/gallery/

Some really nice graphics (but difficult) to try to copy at:

http://www.improving-visualisation.org/visuals

Nicolas

On Jan 15, 2013, at 20:52 , Steven Boada wrote:

Heyya list.

I must admit that my matplotlib-foo is only so so. One of the biggest

problems that I face is seeing cool stuff around the net, and thinking,

“that’s pretty neat, I’d like to copy it.” In reality, I have no idea

how I would go about creating something like that.

Here’s an example: http://imgur.com/JdkR4

Just a little circular histogram thing with some annotations. Obviously,

I’d need the annotate command for the words, but what about the arcs? No

idea, off hand. So my question is, how do you decode (read: what to

think about) figures that you see, and turn them into actual python?

Sure I could post on stack exchange or email all you people every time,

but I want to be better at this. And while some people are going to

scoff and reply “that’s easy, silly” it’s not so for some. I just hate

to admit it’s me.

Thanks for the advice.

Steven Boada

Doctoral Student

Dept of Physics and Astronomy

Texas A&M University

boada@…3847…


Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS

and more. Get SQL Server skills now (including 2012) with LearnDevNow -

200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.

SALE $99.99 this month only - learn more at:

http://p.sf.net/sfu/learnmore_122512


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS

and more. Get SQL Server skills now (including 2012) with LearnDevNow -

200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.

SALE $99.99 this month only - learn more at:

http://p.sf.net/sfu/learnmore_122512


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Agreed. In this particular case, you want a bar plot on a polar axis like
this:
http://matplotlib.org/examples/pylab_examples/polar_bar.html

Pay extra attention to the `bottom` and `width` keyword arguments.
-paul

···

On Jan 15, 2013, at 20:52 , Steven Boada wrote:

> Heyya list.
>
> I must admit that my matplotlib-foo is only so so. One of the biggest
> problems that I face is seeing cool stuff around the net, and thinking,
> "that's pretty neat, I'd like to copy it." In reality, I have no idea
> how I would go about creating something like that.
>
> Here's an example: http://imgur.com/JdkR4
>
> Just a little circular histogram thing with some annotations. Obviously,
> I'd need the annotate command for the words, but what about the arcs? No
> idea, off hand. So my question is, how do you decode (read: what to
> think about) figures that you see, and turn them into actual python?
> Sure I could post on stack exchange or email all you people every time,
> but I want to be *better* at this. And while some people are going to
> scoff and reply "that's easy, silly" it's not so for some. I just hate
> to admit it's me.
>
> Thanks for the advice.

On Tue, Jan 15, 2013 at 12:09 PM, Nicolas Rougier <Nicolas.Rougier@...3782...> wrote:

I do exactly that from time to time (copying a graphic) and I always start
looking at the matplotlib gallery (http://matplotlib.org/gallery.html)
for what is the most similar figure and starts from here (after removing
what is not necessary). Most important is identifying the kind of axis
necessary (cartesian, log, polar, ...)

Some examples at: http://www.loria.fr/~rougier/coding/gallery/

Some really nice graphics (but difficult) to try to copy at:

http://www.improving-visualisation.org/visuals

Hi Steven,

I first look at what types of plots and axes are available out-of-the-box. The gallery and examples sections of the matplotlib webpage are good places to get ideas about what is possible when programming in this mode.

If there isn't an existing axis type which works, I take one of two approaches. If it is a type of plot which I will be making many times, I try to make my own type of axis / projection: see http://matplotlib.org/examples/axes_grid/demo_floating_axes.html for an example of what I mean.

If I'm simply trying to reproduce a graphic only once, I will generally fudge it by drawing a bunch of Collections (usually a PolyCollection or LineCollection, http://matplotlib.org/api/collections_api.html) on a normal cartesian axis, and then hide the axes, ticks and ticklabels.

This approach works for me, though your mileage may vary.

Cheers.
Oliver

···

On Jan 15, 2013, at 11:52 AM, Steven Boada wrote:

Heyya list.

I must admit that my matplotlib-foo is only so so. One of the biggest
problems that I face is seeing cool stuff around the net, and thinking,
"that's pretty neat, I'd like to copy it." In reality, I have no idea
how I would go about creating something like that.

Here's an example: http://imgur.com/JdkR4

Just a little circular histogram thing with some annotations. Obviously,
I'd need the annotate command for the words, but what about the arcs? No
idea, off hand. So my question is, how do you decode (read: what to
think about) figures that you see, and turn them into actual python?
Sure I could post on stack exchange or email all you people every time,
but I want to be *better* at this. And while some people are going to
scoff and reply "that's easy, silly" it's not so for some. I just hate
to admit it's me.

Thanks for the advice.

--

Steven Boada

Doctoral Student
Dept of Physics and Astronomy
Texas A&M University
boada@...3847...

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users