Re: [Matplotlib-users] horizontal alignment of a secondary y-axis

2015-02-14 Thread Tommy Carstensen
) the right aligned secondary y-axis labels, 2) the non-overlapping ticks, 3) the padded secondary y-axis labels. I'm satisfied with this plot / not willing to spend any more time on it. Thank you for your help. On Sat, Feb 14, 2015 at 7:54 PM, Tommy Carstensen wrote: > Ryan, do you know, if

Re: [Matplotlib-users] horizontal alignment of a secondary y-axis

2015-02-14 Thread Tommy Carstensen
post for someone. I > haven't used gnuplot in so long that I don't think I could do this myself. > > R > > On Sat, Feb 14, 2015 at 12:28 PM, Tommy Carstensen > wrote: >> >> Whoa, thanks for a great answer Ryan. I can see, why the level of >> control MPL

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
there is a > way to fix this now. Many years ago that was not the case.) > > Ryan > > On Sat, Feb 14, 2015 at 2:18 PM, Tommy Carstensen > wrote: >> >> Ryan, my use case is indeed that I want to avoid overlapping ticks and >> I want to avoid them by not displaying t

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
Thanks Eric. I decided to get peace of mind and just set the tick labels manually. I can't afford to spend several hours on all of my plots. I appreciate your help a lot. On Sat, Feb 14, 2015 at 7:37 PM, Eric Firing wrote: > On 2015/02/14 9:15 AM, Tommy Carstensen wrote: >> >&g

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
tplotlib.pyplot as plt > from matplotlib.ticker import MultipleLocator > import numpy as np > xs = np.linspace(0,20,1) > ys = np.sin(xs) > fig = plt.figure() > ax1 = fig.add_subplot(111) > ax1.plot(xs, ys) > trimticks(ax1) > plt.show() > > ___ > > &g

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
. Seems to be the easiest thing. It would be awesome, if MPL had the same behaviour as gnuplot, which allows me to simply do: set xtics , On Sat, Feb 14, 2015 at 7:09 PM, Eric Firing wrote: > On 2015/02/14 8:45 AM, Tommy Carstensen wrote: >> >> Erik, that doesn't see

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
2015/02/14 7:33 AM, Tommy Carstensen wrote: >> Thanks again Ryan. That's exactly what I want to achieve; i.e. remove >> the tick at 0 and only keep 5 and 10. Your solution works, but it's a >> bit of hack to use magic constants. I could however get those values >> fro

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
1 = fig.add_subplot(111) > ax1.set_xticks(range(5,11,5)) > ax1.plot(range(11)) > plt.show() > > Ryan > > > On Sat, Feb 14, 2015 at 10:47 AM, Tommy Carstensen > wrote: >> >> Thanks for you answer Eric. I had to get some sleep before trying out >> things. I

Re: [Matplotlib-users] horizontal alignment of a secondary y-axis

2015-02-14 Thread Tommy Carstensen
plotlibrc. Mostly because if > others try to reproduce your plots, they also need your rc file as well. I > haven't used style sheets yet, but that might be a fix to this issue (for me > at least). > > Hope that helps. > > Ryan > > On Sat, Feb 14, 2015 at 10:30 AM,

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
Firing wrote: > On 2015/02/13 3:29 PM, Tommy Carstensen wrote: >> Is it possible to combine MultipleLocator and MaxNLocator? One seems >> to erase the effect of the other. > > They are for different situations. MultipleLocator is for when you know > what you want

Re: [Matplotlib-users] horizontal alignment of a secondary y-axis

2015-02-14 Thread Tommy Carstensen
the OO way: > > import matplotlib.pyplot as plt > fig = plt.figure() > ax = fig.add_subplot(111) > ax.plot([1,3,2]) > labels = ax.get_xticklabels() > [l.set_horizontalalignment('left') for l in labels] > plt.show() > > I think that's the best way. Hope it help

[Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-13 Thread Tommy Carstensen
Is it possible to combine MultipleLocator and MaxNLocator? One seems to erase the effect of the other. -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnershi

[Matplotlib-users] horizontal alignment of a secondary y-axis

2015-02-13 Thread Tommy Carstensen
How can I set the horizontal alignment of a secondary y-axis to 'right'? Currently the numbers are glued to the axis. I want the axis values to be right aligned integers. Thanks. -- Dive into the World of Parallel Programm

[Matplotlib-users] two axes

2014-12-02 Thread Tommy Carstensen
In gnuplot it is quite easy to create two axes, but I can't figure out how to do it in matplotlib. I'm trying this: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt for key1 in keys1: ax1.plot(x, y, style, label=label, color=color, linewidth=3) ax1.set_xlabel(xlabel

Re: [Matplotlib-users] plot Africa only

2014-10-24 Thread Tommy Carstensen
ocefpaf.github.io/python4oceanographers/blog/2013/09/30/natural_earth/ > > Good luck! > > -Filipe > > On Fri, Oct 24, 2014 at 7:21 AM, Tommy Carstensen > wrote: >> >> Does anyone know, whether a continent can be left out when plotting >> with matplotlib base

Re: [Matplotlib-users] markers with same size in legend box

2014-10-24 Thread Tommy Carstensen
is about as good as "proxy artists" in legends, which would be > the official method. (Google "proxy artist matplotlib".) > > It may be relevant that you can access the marker of the legend entries with > the _marker attribute of the handles. Search the maili

Re: [Matplotlib-users] plot Africa only

2014-10-24 Thread Tommy Carstensen
7:57 AM, Tommy Carstensen wrote: > Is it possible to tell matplotlib to only plot the African continent? > http://tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg > > I can do this in gnuplot, but I can't figure out how to do it with > matplotlib

[Matplotlib-users] markers with same size in legend box

2014-10-23 Thread Tommy Carstensen
Is there a way to have all markers in the legend box have the same size? www.tommycarstensen.com/python3_matplotlib_basemap_merc_bluemarbleTrue_scaledTrue_1000GTrue_hresolution.jpg I came up with a solution by plotting a marker outside the latitude and longitude range, but that's not a very good s

Re: [Matplotlib-users] avoid duplicate legends

2014-10-22 Thread Tommy Carstensen
nk >> if you set it to 1, it should solve that problem. >> >> For your second question, I'm not sure, but I'll bet if you poke >> around in the Legend object returned by the function, you'll find >> something. >> >> On Mon, Oct 20, 2014 at 8:04

[Matplotlib-users] avoid duplicate legends

2014-10-20 Thread Tommy Carstensen
How does one avoid duplicate legends? www.tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg Can I make the legend size smaller than the marker size? -- Comprehensive Server Monitoring with Sit

[Matplotlib-users] adding legends

2014-10-20 Thread Tommy Carstensen
Does anyone know, how they were able to add the legend titles "damped" and "oscillatory" to this plot: http://matplotlib.org/examples/pylab_examples/legend_demo.html Can anyone point me to a good tutorial on matplotlib legends? This one is somewhat limited: http://matplotlib.org/users/legend_guide

Re: [Matplotlib-users] unable to run simpletest.py

2014-10-20 Thread Tommy Carstensen
+ 3262 30 org.python.python 0x00010e32 0x1 + 3634 31 org.python.python 0x00010c84 0x1 + 3204 On Fri, Oct 17, 2014 at 3:57 AM, Tommy Carstensen wrote: > To matplotlib-users, > > I ran the installation guide here on Mac OS: > http://matplo

[Matplotlib-users] plot Africa only

2014-10-17 Thread Tommy Carstensen
Is it possible to tell matplotlib to only plot the African continent? http://tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg I can do this in gnuplot, but I can't figure out how to do it with matplotlib/basemap. Thanks, Tommy ---

[Matplotlib-users] python3 and basemap bluemarble()

2014-10-17 Thread Tommy Carstensen
To matplotlib-users, basemap bluemarble() requires PIL, which is not available for Python3. What is the usual workaround, when using Python and wanting to do bluemarble()? Thanks, Tommy -- Comprehensive Server Monitoring

[Matplotlib-users] unable to run simpletest.py

2014-10-17 Thread Tommy Carstensen
To matplotlib-users, I ran the installation guide here on Mac OS: http://matplotlib.org/basemap/users/installing.html Except I did brew install geos and subsequently did: export DYLD_LIBRARY_PATH=/Users/tc9/homebrew/lib export GEOS_LIBRARY_PATH=/Users/tc9/homebrew/Cellar/geos/3.4.2 export GEOS_DI

[Matplotlib-users] ValueError: The Cairo backend can not draw paths longer than 18980 points.

2014-07-13 Thread Tommy Carstensen
To matplotlib-users, When I do: cd basemap-1.0.7/examples python3 simpletest.py Then I get this error message: Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.3.1-py3.4-linux-i686.egg/matplotlib/backends/backend_gtk3cairo.py", line 32, in on_draw_ev

[Matplotlib-users] ImportError: No module named 'mpl_toolkits'

2014-07-13 Thread Tommy Carstensen
To matplotlib-users, When I do this on Linux: from mpl_toolkits.basemap import Basemap Then I get this error: ImportError: No module named 'mpl_toolkits' I also ran apt-get, but I still get the error: sudo apt-get install python-mpltoolkits.basemap What am I doing wrong? I also tried to get it