And if you have mutually prime numbers of colors,
linestyles, widths, you can automatically generate
more distinct lines than I can distinguish... If there's any
wxcuse for treating them as a series, I replot
when I know how many I have, and space the
colors through a colorbar.
&C
Away from hom
On Mon, Aug 23, 2010 at 1:53 PM, xiaoni wrote:
> Hello,
> I got a problem with backend in matplotlib.
> I used ipython for launching the codes and the backend of matplotlib
> is GTKAgg. I have a code.py with a for loop for processing data, and in
> each iteration I read and plot and s
By the way, I found that the following generator expression made things
easy:
def styles():
return ( {'c' : color, 'ls' : style, 'lw' : width} for color, style,
width in itertools.product(colors, linestyles, linewidths))
then you can do something like
for result, style in zip(results, styles
Thanks!
On Mon, Aug 23, 2010 at 12:38 PM, Aman Thakral wrote:
> Hi John,
>
> Here is a simple way to do it.
>
> import matplotlib.pyplot as plt
> import numpy as np
> fig = plt.figure()
> ax = fig.add_subplot(111)
>
> colors = ('red','green','blue','yellow','orange')
> linestyles = ('-','--',':'
Hi John,
Here is a simple way to do it.
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111)
colors = ('red','green','blue','yellow','orange')
linestyles = ('-','--',':')
linewidths = (0.5,2)
y = np.random.randn(100,30)
x = range(y.shape[0])
i = 0
fo
2010/8/20 Bruce Ford :
> I have a grid with values ranging from exactly 0.0 and 100.0. When I
> plot this with colorbar, the base of the colorbar is labeled "-0.0".
> Is this a default for 0.0...to plot it with as a negative number? Any
> workarounds?
How sure are you that the floating point num
Here are a couple of functions you might try, with a few colors and line
styles I use:
import itertools
from pylab import *
COLORS = ['#990033', '#FF', '#00FF00', '#F79E00',
'#ff00ff', '#0080FF', '#FF', '#2D0668',
'#2EB42E', '#ff6633', '#8000ff', '#33',
2010/8/20 Benjamin Root :
> This used to trip me up as well. However, for colors in matplotlib, None
> (without quotes) tells mpl to use the default color, while 'None' (typically
> not case-sensitive) means "do not plot any color".
More precise, the string 'None' translates to fully transparent
2010/8/20 Michael Droettboom :
>> Yeah, it's my issue, but I'm not happy with fixing it. Currently,
>> matplotlib forces the xticks (i.e., the theta ticks) to be at sensible
>> values via .set_xticks() and .set_xlabels() (projections/polar.py).
>>
>> I'm coding a matplotlib extension package which
Hello,
I have a plot with lots of curves on it (say 30), and I would like to have
some way of distinguishing the curves from each other. Just plotting them
works well for a few curves because they come out as different colors unless
you specify otherwise, but if you do too many you start getting r
Hello,
I got a problem with backend in matplotlib.
I used ipython for launching the codes and the backend of
matplotlib is GTKAgg. I have a code.py with a for loop for processing data,
and in each iteration I read and plot and save the figures. Because
there
On 08/23/2010 11:08 AM, Daniel Hyams wrote:
Thanks for your response Michael!
Deleting the fontList.cache indeed solved the problem. The first
sample that I gave below now works fine under both Windows and Linux;
whew...I would have never known about that cache file without your help.
So, s
Thanks for your response Michael!
Deleting the fontList.cache indeed solved the problem. The first sample
that I gave below now works fine under both Windows and Linux; whew...I
would have never known about that cache file without your help.
So, should the fontList.cache file be deleted each tim
On 08/22/2010 10:00 PM, Daniel Hyams wrote:
I am searching for advice on how to handle selecting a specific font,
and using that in a matplotlib figure. As a background, the font will
be picked through the wx.FontDialog (common font dialog) provided by
wxPython. So, what I will have is the fo
What I use to create animations is plainly:
savefig(head+str(filecode).zfill(digits)+format, dpi=205)
plt.clf()
filecode+=1
where filecode is the name, digits an int and format usually .png.
clf() is important in order to prevent memory leaks, because otherwise
mpl stores all the figures one in
On Mon, Aug 23, 2010 at 7:59 AM, Kim Hansen wrote:
> Hi list,
>
> I am using animated artists to generate an animation, where I save each step
> in the anmantion as a png using the savefig method of the figure instance
> after drawing the animated artists on a cached background and after
> fig.can
Hi list,
I am using animated artists to generate an animation, where I save each step
in the anmantion as a png using the savefig method of the figure instance
after drawing the animated artists on a cached background and after
fig.canvas.blit.
What I see on screen are the updated animated artist
17 matches
Mail list logo