Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
Firing efir...@hawaii.edu 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 your tick interval

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

2015-02-14 Thread Tommy Carstensen
]) labels = ax.get_xticklabels() [l.set_horizontalalignment('left') for l in labels] plt.show() I think that's the best way. Hope it helps. Ryan On Fri, Feb 13, 2015 at 7:29 PM, Tommy Carstensen tommy.carsten...@gmail.com wrote: How can I set the horizontal alignment of a secondary y-axis

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

2015-02-14 Thread Tommy Carstensen
matplotlibrc. 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, Tommy Carstensen tommy.carsten

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
: On 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 from the xlim. Eric, I would describe

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
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 start, incr On Sat, Feb 14, 2015 at 7:09 PM, Eric Firing efir...@hawaii.edu wrote: On 2015/02/14 8:45 AM, Tommy Carstensen wrote: Erik, that doesn't seem to work either. I

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
, ys) trimticks(ax1) plt.show() ___ On Sat, Feb 14, 2015 at 1:45 PM, Tommy Carstensen tommy.carsten...@gmail.com wrote: Erik, that doesn't seem to work either. I tried this: import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator class

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
(range(5,11,5)) ax1.plot(range(11)) plt.show() Ryan On Sat, Feb 14, 2015 at 10:47 AM, Tommy Carstensen tommy.carsten...@gmail.com wrote: Thanks for you answer Eric. I had to get some sleep before trying out things. I currently have the code below, but it does not remove the zero value

Re: [Matplotlib-users] MultipleLocator and MaxNLocator

2015-02-14 Thread Tommy Carstensen
.) Ryan On Sat, Feb 14, 2015 at 2:18 PM, Tommy Carstensen tommy.carsten...@gmail.com wrote: Ryan, my use case is indeed that I want to avoid overlapping ticks and I want to avoid them by not displaying them. Here is a guy with the same problem: http://stackoverflow.com/questions/9422587

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

2015-02-14 Thread Tommy Carstensen
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 tommy.carsten...@gmail.com wrote: Whoa, thanks for a great answer Ryan. I can see, why the level of control MPL gives you is a great sales pitch. It's one

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 tommy.carsten...@gmail.com wrote: Ryan

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 efir...@hawaii.edu wrote: On 2015/02/14 9:15 AM, Tommy Carstensen wrote: Eric

[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

[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

[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)

Re: [Matplotlib-users] plot Africa only

2014-10-24 Thread Tommy Carstensen
at 7:57 AM, Tommy Carstensen tommy.carsten...@gmail.com 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

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

2014-10-24 Thread Tommy Carstensen
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 mailing list archives for this one. -Sterling On Oct 23, 2014, at 8:05PM, Tommy

Re: [Matplotlib-users] plot Africa only

2014-10-24 Thread Tommy Carstensen
/blog/2013/09/30/natural_earth/ Good luck! -Filipe On Fri, Oct 24, 2014 at 7:21 AM, Tommy Carstensen tommy.carsten...@gmail.com wrote: Does anyone know, whether a continent can be left out when plotting with matplotlib basemap? For example I wish to hide Europe (and Madagascar

[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

Re: [Matplotlib-users] avoid duplicate legends

2014-10-22 Thread Tommy Carstensen
if you poke around in the Legend object returned by the function, you'll find something. On Mon, Oct 20, 2014 at 8:04 AM, Tommy Carstensen tommy.carsten...@gmail.com wrote: How does one avoid duplicate legends? www.tommycarstensen.com

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

2014-10-20 Thread Tommy Carstensen
PyRun_SimpleFileExFlags + 717 29 org.python.python 0x00010012856e Py_Main + 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 tommy.carsten

[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:

[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

[Matplotlib-users] plot Africa only

2014-10-18 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] 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

[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

[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

[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