[Matplotlib-users] Setting boundaries for a colorbar

2010-04-14 Thread Andreas Hilboll
Hello there, using matplotlib 0.99, I have a problem with colorbars, which is illustrated by the following code: ---8--- from matplotlib import ticker import numpy as np a = np.arange(676).reshape((26,26)) x = y = np.arange(26) colorMap = mpl.cm.get_cmap('jet', 10) colorNorm =

[Matplotlib-users] Scatterplots with colorscale?

2010-05-21 Thread Andreas Hilboll
Hi there, the attached figure shows a scatterplot, where the colors indicate the density of measurement points. Is there any way to do this with matplotlib? Thanks for your insight, Andreas. attachment:

[Matplotlib-users] hist() and masked_array

2010-06-17 Thread Andreas Hilboll
Hi there, I just noticed today that when I call hist() on a masked_array, also those values which are masked out are displayed (with their fill_value). Is that really the desired behaviour? I'm working in an environment where we're mostly using masked_array, but also sometimes the 'normal'

[Matplotlib-users] export colormap to GMT's CPT format

2012-06-19 Thread Andreas Hilboll
Hi, I have a `LinearSegmentedColormap` which I would like to export to GMT's CPT format. However, I couldn't find a way to get the RBG values of the `N` color slices of the colormap, which I need in order to create the CPT file. Any help is greatly appreciated. Cheers, Andreas.

Re: [Matplotlib-users] Pgf Backend with Xelatex support

2012-06-27 Thread Andreas Hilboll
Hi, When creating figures to be included in Latex documents I encountered a few problems. In the end the text rendering just doesn't blend in well, one way or another. I found that the problems can be fixed by using Xelatex, which provides full unicode support and is able to use the

Re: [Matplotlib-users] Dates interpretation on csv2rec

2012-06-29 Thread Andreas Hilboll
Dear all, I have a CSV file with the first column with timestamps: 0:00:00 01/01/2007, 0.000, 10, 0.000, 10, 0.000, 10: 00:00:00 02/01/2007, 0.000, 10, 0.000, 10, 0.000, 10 00:00:00 03/01/2007, 0.000, 10, 0.000, 10,

Re: [Matplotlib-users] high resolution map image

2012-07-16 Thread Andreas Hilboll
Hi all, I've to draw a plot in a very small area (about 1 degree of height/width) with a map image. I've tried with the warpimage method and with the Nasa visible Earth images (http://visibleearth.nasa.gov/view_cat.php?categoryID=1484), but I've some problems: - with the resolution

[Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Andreas Hilboll
Hi, I would like to create a figure which only contains a legend, and no axes at all. I would like to manually assign the colors. I found this here: http://stackoverflow.com/a/3302666 but from there on, I'd like to remove the axes, and put the legend into three columns. Any help is greatly

Re: [Matplotlib-users] How to plot only a legend?

2012-07-26 Thread Andreas Hilboll
Hi Andreas, 2012/7/26 Andreas Hilboll li...@hilboll.de: Hi, I would like to create a figure which only contains a legend, and no axes at all. I would like to manually assign the colors. I found this here: http://stackoverflow.com/a/3302666 but from there on, I'd like to remove

[Matplotlib-users] Placing a 'title' inside a legend

2012-07-27 Thread Andreas Hilboll
Hi, I'd like to place something like a 'title' inside a legend's box. In my specific case, I have a legend with 5 entries, arranged in 5 columns, so they're horizontally next to each other in one row. Now what I'd like to have is inside the legend's box a first row (above the legend entries),

Re: [Matplotlib-users] How to plot only a legend?

2012-07-27 Thread Andreas Hilboll
On Thu, Jul 26, 2012 at 06:05:39PM +0200, Andreas Hilboll wrote: Hi Andreas, 2012/7/26 Andreas Hilboll li...@hilboll.de: Hi, I would like to create a figure which only contains a legend, and no axes at all. I would like to manually assign the colors. I found this here

Re: [Matplotlib-users] Placing a 'title' inside a legend

2012-07-27 Thread Andreas Hilboll
Hi Andreas, 2012/7/27 Andreas Hilboll li...@hilboll.de: Hi, I'd like to place something like a 'title' inside a legend's box. In my specific case, I have a legend with 5 entries, arranged in 5 columns, so they're horizontally next to each other in one row. Now what I'd like to have

Re: [Matplotlib-users] Placing a 'title' inside a legend

2012-07-27 Thread Andreas Hilboll
Hi Francesco, I'd like to place something like a 'title' inside a legend's box. In my specific case, I have a legend with 5 entries, arranged in 5 columns, so they're horizontally next to each other in one row. Now what I'd like to have is inside the legend's box a first row (above the

Re: [Matplotlib-users] Matplotlib produced plots in academic journal articles

2012-10-08 Thread Andreas Hilboll
Hello, Is there any collection of articles that shows academic articles using matplotlib produced plots? I have come across a few recent articles in my field with plots produced by matplotlib. Though, the mpl page shows some nice examples of publication quality plots, it would be nice to

[Matplotlib-users] color pallette suggestions wanted

2012-10-12 Thread Andreas Hilboll
Hi, I have some data I want to plot using pcolormesh. It's 2d climatological data, see the attached plot. My data is in a range from -7 to +0.6. I want to be 0.0 to be clearly visible, while at the same time, the color range should show the full dynamic of the values. I played with the bwr and

[Matplotlib-users] x-label location not at xtick location?

2012-10-12 Thread Andreas Hilboll
Hi, another question. Given the plot from my last email (I attached the code to this one as well), I would like to have the x-labels (J, F, ...) not at the location of the xticks, but centered in between to xticks. I would then move the xticks so that they form the bins to the data chunks, and

[Matplotlib-users] xlabels on top, ylabels on right

2012-10-12 Thread Andreas Hilboll
Hi, me again :) I'm looking for a way to have the xlabels on the top (instead of bottom), and the ylabels on the right (instead of left). I guess I could do something with twinx / twiny and just not use the left/bottom axis, but I'm sure there is some more elegant way ... Cheers, Andreas.

Re: [Matplotlib-users] xlabels on top, ylabels on right

2012-10-12 Thread Andreas Hilboll
Hi, me again :) I'm looking for a way to have the xlabels on the top (instead of bottom), and the ylabels on the right (instead of left). I guess I could do something with twinx / twiny and just not use the left/bottom axis, but I'm sure there is some more elegant way ... I need to correct

Re: [Matplotlib-users] xlabels on top, ylabels on right

2012-10-12 Thread Andreas Hilboll
Hi, me again :) I'm looking for a way to have the xlabels on the top (instead of bottom), and the ylabels on the right (instead of left). I guess I could do something with twinx / twiny and just not use the left/bottom axis, but I'm sure there is some more elegant way ... I need to

Re: [Matplotlib-users] Filling area with a color like in an integral

2012-10-16 Thread Andreas Hilboll
I have a coordination system with some plotted dots connected with a line. Now I'd like to fill up the whole space between the line and the x-axis. It is the same as in a integral calculation: http://www.definicionabc.com/wp-content/uploads/Integral.png What I want to do is the same as the

[Matplotlib-users] 3d surfaces in basemap?

2012-10-27 Thread Andreas Hilboll
Hi, maybe matplotlib is capable of doing this: I have two gridded datasets, A and B, for say Europe. Now I want to plot a 3d surface with the z-values given by dataset A. The surface should be colored using a given color palette and the values from dataset B. Any ideas on how to do this are

[Matplotlib-users] interactively getting z-value on a pcolormesh

2013-02-01 Thread Andreas Hilboll
Hi, I often use mpl interactively (in ipython --pylab) to plot 2d data on basemaps using pcolormesh. When moving the mouse over the map, I can see x,y coordinates being displayed in the bottom right of the plot window. What would be more interesting for me is the value of the pcolomesh'ed data

Re: [Matplotlib-users] Problems to plot more than 9 subplots

2013-02-19 Thread Andreas Hilboll
The subplot(111) works only until 9 subplots, and this function does not allow me to put rect=(7,3,nrfig). I get the error: 'Single argument to subplot must be a 3-digit integer') ValueError: Single argument to subplot must be a 3-digit integer I always do ax = fig.add_subplot(7, 3,

Re: [Matplotlib-users] Problems to plot more than 9 subplots

2013-02-19 Thread Andreas Hilboll
On 02/19/2013 01:52 PM, patricia wrote: Thanks Andreas, Yes I usually do the same, but in this case I am not managing to do it due to the functions being used. It does not allow me to put (7,3, nfig) inside the xx = TaylorDiagram(refstd, fig=fig, rect=122, label=xx). This is the code that I

[Matplotlib-users] Vertical alignment of AnchoredTexts in ImageGrid

2013-03-28 Thread Andreas Hilboll
Hi, I'm cross-posting a question I asked on SO: http://stackoverflow.com/q/15681890/152439 How can I vertically align text in matplotlib? My situation is as follows: I'm using `ImageGrid`, to plot a row of five images: grid = ImageGrid(fig, rect=(0.06, 0., 0.885,

[Matplotlib-users] cpt-city colormaps for matplotlib

2013-04-24 Thread Andreas Hilboll
Hi, I'd like to have the cpt-city colormaps available in matplotlib. Is there already a module for this? If not, I'll try to patch something together. What do you think? Cheers, Andreas -- Try New Relic Now We'll Send

[Matplotlib-users] Question about basic_example_writer.py

2013-11-27 Thread Andreas Hilboll
Hi, when running basic_example_writer.py, I get *.mp4 files with a canvas size of 800x600 pixels (at least that's what mplayer tells me). However, I have trouble understanding where this canvas size comes from. The example does not explicitly set the dpi or the figure size, and I don't have a

[Matplotlib-users] completely filling a figure canvas

2014-02-13 Thread Andreas Hilboll
I need some help in saving effort to make a figure fill its canvas: Is there a way to have subplots_adjust() automatically chose left, right, bottom, top values so that everything that's been drawn tightly fits the figure? Basically I'm looking for something similar to bbox_inclues='tight' in

Re: [Matplotlib-users] completely filling a figure canvas

2014-02-14 Thread Andreas Hilboll
Is there a way to have subplots_adjust() automatically chose left, right, bottom, top values so that everything that's been drawn tightly fits the figure? What about plt.tight_layout() ? (or fig.tight_layout ) Yes, thanks, Pierre! Andreas.

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] datestr2num for day/month/year

2014-04-25 Thread Andreas Hilboll
On 25.04.2014 11:02, Mark Bakker wrote: OK, I figured out I can use: converters={0:strpdate2num('%d-%m-%y')} What now if part of my dates are given as 'day-month-year' and part as 'day/month/year' in the same file (I know, who does that, an I could do a replace first and then read it in).

Re: [Matplotlib-users] A separate legend box for the markers only?

2014-09-12 Thread Andreas Hilboll
On 12.09.2014 20:01, ConcreteVitamin wrote: Accidentally hit send, sorry.. Completed email: I have a graph that looks like this [1], in which each line has different markers for the same number of points. I'd like to add a separate legend box (like the one already in the graph) for the