Re: [Matplotlib-users] Can't plot NCEP reanalysis data

2014-03-05 Thread Fadzil Mnor
Hi all, thanks for your time. Paul, yes, it should be 'omg', I did some copy-and-paste error while writing the email and test the code at the same time. Alex, yes, that's the problem that i wasn't sure how to do. But thanks, I'll try to figure it out how and try in a bit. Cheers, Postgraduate

Re: [Matplotlib-users] Can't plot NCEP reanalysis data

2014-03-05 Thread Signell, Richard
Fadzil, Questions like this that involve code are great to ask on stackoverflow, tagging with netcdf, matplotlib and python. -Rich On Wed, Mar 5, 2014 at 6:57 AM, Fadzil Mnor fadzilmno...@gmail.com wrote: Hi all, thanks for your time. Paul, yes, it should be 'omg', I did some copy-and-paste

Re: [Matplotlib-users] Can't plot NCEP reanalysis data

2014-03-05 Thread Benjamin Root
The issue I see is one of ensuring that your inputs into contourf() are of the expected shapes. If you want a generalized script, then you will need to do various steps that can prepare 3d data into a 2d by assuming a particular level. The fun part of all of this is that different data sources

Re: [Matplotlib-users] Can't plot NCEP reanalysis data

2014-03-05 Thread Fadzil Mnor
Hi all, Signel, yeah, I should have post it on stackoverflow. Will do that next time. Benjamin, I've been using GrADS for the last 3 years, and just recently using python for more functionality (which came with a price,of course-learning curve). Seems like I 've found the solution. I should have

[Matplotlib-users] Access to color cycle?

2014-03-05 Thread Adam Hughes
Hi, I am making a stacked histogram where one must enter the desired colors together in a list/array when the histogram is called. For certain objects in my code, it's helpful to assign a color to them, so that they are immediately identified across various plots. Therefore, I essentially want

Re: [Matplotlib-users] Access to color cycle?

2014-03-05 Thread Adam Hughes
Well, the hack wasn't as messy as I thought. Still feel like there's a better way... def show_colors_default(): fig, axfoo = plt.subplots() clist = [] c = axfoo._get_lines.color_cycle.next() # Iterate until duplicate is found while c not in clist: clist.append(c)

Re: [Matplotlib-users] Access to color cycle?

2014-03-05 Thread Andreas Hilboll
On 05.03.2014 20:56, Adam Hughes wrote: Hi, I am making a stacked histogram where one must enter the desired colors together in a list/array when the histogram is called. For certain objects in my code, it's helpful to assign a color to them, so that they are immediately identified across

Re: [Matplotlib-users] Access to color cycle?

2014-03-05 Thread Adam Hughes
Thanks Andreas. That is correct; however, I'd rather not make this change global. I only want a subset of my plots to have this behavior. I feel like changing the rcparams would change this globally and probably confuse users who don't know this is being called. I should have realized this

[Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Asma Riyaz
Hi I am trying to merge a heat map(matplotlib) with a tree(.png), but the .png does not plot as needed or for that matter cannot be seen easily. Here is my code: ### CODE cmap = mpl.cm.hot if outlier==0: threshold=1 else: threshold=outlier-0.01 fig =

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Paul Hobson
Olga Botnivik is doing some work with these types of figures in her fork of the seaborn project. Example here: http://nbviewer.ipython.org/gist/olgabot/8341784 Link to the PR in github: https://github.com/mwaskom/seaborn/pull/73 Those might be a good place to start. On Wed, Mar 5, 2014 at

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Pierre Haessig
Hi Asma, Le 05/03/2014 21:19, Asma Riyaz a écrit : I am trying to merge a heat map(matplotlib) with a tree(.png), but the .png does not plot as needed or for that matter cannot be seen easily. Here is my code: ### CODE [] img = ht_ax.imshow(data, cmap=cmap,

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Asma Riyaz
Sorry I somehow forgot to paste the imshow call to plot the .png image(pasted the entire code again), I am trying the different interpolation parameters in the mean time as suggested by Pierre data=np.array(full_len) cmap = mpl.cm.hot if outlier==0: threshold=1 else:

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Eric Firing
On 2014/03/05 11:37 AM, Asma Riyaz wrote: Sorry I somehow forgot to paste the imshow call to plot the .png image(pasted the entire code again), I am trying the different interpolation parameters in the mean time as suggested by Pierre data=np.array(full_len) cmap = mpl.cm.hot if