Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Matthieu Huin
If you don't have any special use for the config dir, this might be a more straightforward solution that doesn't require patching matplotlib. Simply paste this in your code, before importing matplotlib : import os os.environ['HOME'] = '/tmp/' Might be safer to use 'MPLCONFIGDIR' instead of

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Ryan May
On Thu, Nov 4, 2010 at 10:49 AM, Philip Semanchuk phi...@semanchuk.com wrote: Hi all, I've run into an aspect of matplotlib's setup that seems awkward. I'm seeing this on Ubuntu, but I imagine it would happen on any *nix platform. If python is running under sudo the first time matplotlib is

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Ryan May
On Mon, Nov 8, 2010 at 8:34 AM, Philip Semanchuk phi...@semanchuk.com wrote: Hi Ryan, Thanks. I don't know why sudo behaves the way it does with regard to $HOME, but the behavior of sudo is not under my control (nor matplotlib's). Also, I expect that *lots* of software depends on this

[Matplotlib-users] text element just above previous text element

2010-11-08 Thread Werner F. Bruhin
I like to have 2 or 3 text elements stacked on top of each other on top of a bar. Currently it works for the first text element by doing: height = bar.get_height() xCorr = bar.get_x() yCorr = 0.20 + height txtax = axes.text(xCorr, yCorr, hstr) trying to add the second text just above the

Re: [Matplotlib-users] config dir owned by root

2010-11-08 Thread Philip Semanchuk
On Nov 8, 2010, at 9:51 AM, Ryan May wrote: On Mon, Nov 8, 2010 at 8:34 AM, Philip Semanchuk phi...@semanchuk.com wrote: Hi Ryan, Thanks. I don't know why sudo behaves the way it does with regard to $HOME, but the behavior of sudo is not under my control (nor matplotlib's). Also, I expect

Re: [Matplotlib-users] text element just above previous text element

2010-11-08 Thread Jae-Joon Lee
On Tue, Nov 9, 2010 at 12:21 AM, Werner F. Bruhin werner.bru...@free.fr wrote: I like to have 2 or 3 text elements stacked on top of each other on top of a bar. Currently it works for the first text element by doing: height = bar.get_height() xCorr = bar.get_x() yCorr = 0.20 + height

Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Nicolas Bigaouette
How can I automatically cycle through distinctive line markers? I want a semilog plot, composed of a number of lines. Each line should have a different color and marker. I simply use: colors = ['b', 'r', 'c', 'm', 'k', 'g', 'y'] symbols = ['-', '--', '-.', ':'] nc = len(colors) ns =

Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Ryan May
On Fri, Nov 5, 2010 at 8:07 AM, Aman Thakral aman.thak...@gmail.com wrote: Hi, The best way to do this is to use a generator: import itertools import matplotlib.pyplot as plt import numpy as np def _ncycle(iterable,n):         Method to create a generator from an iterable.  It keeps

Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Aman Thakral
Honestly, I can't even remember why it is wrapped. I think this is just a relic of some old example that I had lying around. Serves me right for just copying and pasting without thinking :P . A straight call to itertools.cycle is definitely much cleaner. Also, is there an example of this in the

Re: [Matplotlib-users] how to get legend size, try #2.

2010-11-08 Thread Jae-Joon Lee
On Sat, Oct 30, 2010 at 2:16 PM, Paul Ivanov pivanov...@gmail.com wrote: Thanks Paul!  Your suggestion got me part of the way, but I've run into another problem...I'm using draggable legends, I'm also wanting to fetch the current position of the legend after a drag.  The draggable legend