SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S

1
(20)
2
(16)
3
(9)
4
(12)
5
(14)
6
(22)
7
(17)
8
(33)
9
(26)
10
(32)
11
(47)
12
(26)
13
(7)
14
(24)
15
(44)
16
(42)
17
(22)
18
(31)
19
(8)
20
(4)
21
(15)
22
(27)
23
(41)
24
(33)
25
(31)
26
(24)
27
(10)
28
(20)






Showing 13 results of 13

From: James C. <jco...@uc...> - 2010年02月02日 22:20:30
Great. Just what I needed. I appreciate it. 
- James
On Feb 2, 2010, at 1:56 PM, Eric Firing wrote:
> James Conners wrote:
>> Hi, 
>> 
>> I'm having some trouble producing a filled contour how I want it. 
>> 
>> Say I'm plotting data over the range [1.2, 20] using 15 level lines evenly spaced
>> over that interval. I'd like the min of that interval to map to the min of the color spectrum (say "jet" so dark blue)
>> and the max of that interval to map to the max of the spectrum (so red). It doesn't seem to work that way. 
>> When I do filled contours, sometimes the low values are mapped to black or dark gray and 
>> sometimes they're mapped to blue. 
>> 
>> I always want the endpoints of the spectrum to map to the endpoints of the plotted values. Can this be done? 
>> Any help is appreciated. Thanks. 
> 
> The root of the problem is a questionable choice I made in the 
> _process_colors method of ContourSet; I will investigate either changing 
> it, or making it an option. In the meantime, there is an easy 
> workaround: just use the set_clim method of the ContourSet, or the 
> pyplot.clim function. In ipython -pylab:
> 
> z = rand(10,10)
> cs = contourf(z)
> cb = colorbar()
> cs.set_clim(cs.layers.min(), cs.layers.max())
> draw()
> 
> The idea behind the present default choice for clim within contourf is that
> the range of colors covers values from the lowest contour level to the 
> highest; the color of a *layer* is then the color of the midpoint 
> between its bounding levels. This has some logic to it (and is more 
> consistent with pcolor and image color mapping), but I agree that it 
> probably makes more sense to use the full color range by default; most 
> often, this is likely to be what one wants, and for the exceptions one 
> can always use set_clim.
> 
> Eric
> 
>> 
>> - James
>> 
>> 
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Eric F. <ef...@ha...> - 2010年02月02日 21:56:31
James Conners wrote:
> Hi, 
> 
> I'm having some trouble producing a filled contour how I want it. 
> 
> Say I'm plotting data over the range [1.2, 20] using 15 level lines evenly spaced
> over that interval. I'd like the min of that interval to map to the min of the color spectrum (say "jet" so dark blue)
> and the max of that interval to map to the max of the spectrum (so red). It doesn't seem to work that way. 
> When I do filled contours, sometimes the low values are mapped to black or dark gray and 
> sometimes they're mapped to blue. 
> 
> I always want the endpoints of the spectrum to map to the endpoints of the plotted values. Can this be done? 
> Any help is appreciated. Thanks. 
The root of the problem is a questionable choice I made in the 
_process_colors method of ContourSet; I will investigate either changing 
it, or making it an option. In the meantime, there is an easy 
workaround: just use the set_clim method of the ContourSet, or the 
pyplot.clim function. In ipython -pylab:
z = rand(10,10)
cs = contourf(z)
cb = colorbar()
cs.set_clim(cs.layers.min(), cs.layers.max())
draw()
The idea behind the present default choice for clim within contourf is that
the range of colors covers values from the lowest contour level to the 
highest; the color of a *layer* is then the color of the midpoint 
between its bounding levels. This has some logic to it (and is more 
consistent with pcolor and image color mapping), but I agree that it 
probably makes more sense to use the full color range by default; most 
often, this is likely to be what one wants, and for the exceptions one 
can always use set_clim.
Eric
> 
> - James
> 
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: James C. <jco...@uc...> - 2010年02月02日 20:05:03
Hi, 
I'm having some trouble producing a filled contour how I want it. 
Say I'm plotting data over the range [1.2, 20] using 15 level lines evenly spaced
over that interval. I'd like the min of that interval to map to the min of the color spectrum (say "jet" so dark blue)
and the max of that interval to map to the max of the spectrum (so red). It doesn't seem to work that way. 
When I do filled contours, sometimes the low values are mapped to black or dark gray and 
sometimes they're mapped to blue. 
I always want the endpoints of the spectrum to map to the endpoints of the plotted values. Can this be done? 
Any help is appreciated. Thanks. 
- James
From: Ben A. <BAx...@co...> - 2010年02月02日 19:29:59
I think I found a bug with in the Axes3D color support. When there are 3 or 4 points to plot, then the you cannot specify an array of rgba arrays for the colors of the points. 
I tested in matplotlib 0.99.1 and the latest code from SVN. Both exibit the bug. This simple code demonstrates the bug:
#simple Axes3D example setting color and size of points
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from numpy.random import rand
fig = plt.figure()
ax = Axes3D(fig)
n = 3 # ERROR WHEN n = 3 or 4 !!
xs = np.random.rand(n)
ys = np.random.rand(n)
zs = np.random.rand(n)
ss = np.random.rand(n) * 1000
cs = rand(n, 4)
ax.scatter(xs, ys, zs, s=ss, c=cs)
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z Label')
plt.show()
#end code
This is the call trace for the bug:
Exception in Tkinter callback
Traceback (most recent call last):
 File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__
 return self.func(*args)
 File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 212, in resize
 self.show()
 File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 215, in draw
 FigureCanvasAgg.draw(self)
 File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line314, in draw
 self.figure.draw(self.renderer)
 File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper
 draw(artist, renderer, *kl)
 File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 773, in draw
 for a in self.axes: a.draw(renderer)
 File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py", line 150, in draw
 for col in self.collections]
 File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\art3d.py", line 290, in do_3d_projection
 self.set_facecolors(zalpha(self._facecolor3d, vzs))
 File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\art3d.py", line 497, in zalpha
 colors = [(c[0], c[1], c[2], c[3] * s) for c, s in zip(colors, sats)]
IndexError: index out of bounds
Thanks,
-Ben
From: Eric F. <ef...@ha...> - 2010年02月02日 16:43:53
Yannick Copin wrote:
> Eric Firing wrote:
>> Maybe I am misunderstanding, but the EllipseCollection in the example 
>> is panning and zooming as I expect. The shapes and orientations are 
>> staying the same while the scale expands and contracts with the x-axis.
>>
>> The problem is that the option you are looking for does not exist 
>> yet. I am not sure yet whether what you need is identical to an 
>> option I added to quiver (from which I partially derived 
>> EllipseCollection). I suspect it is.
> 
> Thanks, I now understand better what is the main goal of 
> EllipseCollection: in a quiver-like use, you don't want indeed the 
> plotted ellipses to change size and/or orientation with scaling and 
> zooming.
> 
>> Do you want width to scale with x and height to scale with y? And the 
>> angle to scale such that a 45-degree angle always corresponds to equal 
>> increments in x and in y, all in data units?
> 
> Yes, in the context of error-ellipses, I would like to see my ellipses 
> scale with x and y, as they do when I plot them individually as Ellipse 
> patches (see example scripts, the blue ellipses are what I would like to 
> obtain using an EllipseCollection), something like "units='data'" in 
> EllipseCollection...
I agree, this really is needed, and I will put it in ASAP. It may take 
a little while, though, so in the meantime you are stuck with the 
individual patches.
Thanks for bringing it to my attention.
Eric
From: Luc G. <luc...@gm...> - 2010年02月02日 15:32:03
Hi Jon, I'm sorry I didn't mean 0-1. I meant from 0 to 1. I have tried with values like 0.15, 0.55, 0.95 and 1. The polygons stay opaque with the same colour in all cases.
Luc
On 2010年02月02日, at 2:59 PM, John Hunter wrote:
> On Tue, Feb 2, 2010 at 7:47 AM, Luc Gervais <luc...@gm...> wrote:
>> Hello all,
>> 
>> I am creating radar plots in matplolib and I cannot get transparent polygons.
>> 
>> I have run the examples from the gallery:
>> http://matplotlib.sourceforge.net/examples/api/radar_chart.html
>> http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html
>> 
>> The colours show differently on my computer and the polygons are opaque. I have changed
>> ax.set_alpha(0-1)
>> ax.fill(theta, d, facecolor=color, alpha=0-1)
>> plt.Polygon(verts, closed=True, edgecolor='k', alpha=0-1)
> 
> You are writing "0-1" which is -1 which is not a valid alpha value.
> This should probably raise an exception, but apparently it doesn't.
> Valid alphas are in the range 0 to 1 Try 0.1 rather than 0-1. Note
> alpha is not supported in postscript output, but does work in raster
> displays, PNG, PDF and SVG.
> 
> JDH
From: John H. <jd...@gm...> - 2010年02月02日 13:59:42
On Tue, Feb 2, 2010 at 7:47 AM, Luc Gervais <luc...@gm...> wrote:
> Hello all,
>
> I am creating radar plots in matplolib and I cannot get transparent polygons.
>
> I have run the examples from the gallery:
> http://matplotlib.sourceforge.net/examples/api/radar_chart.html
> http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html
>
> The colours show differently on my computer and the polygons are opaque. I have changed
> ax.set_alpha(0-1)
> ax.fill(theta, d, facecolor=color, alpha=0-1)
> plt.Polygon(verts, closed=True, edgecolor='k', alpha=0-1)
You are writing "0-1" which is -1 which is not a valid alpha value.
This should probably raise an exception, but apparently it doesn't.
Valid alphas are in the range 0 to 1 Try 0.1 rather than 0-1. Note
alpha is not supported in postscript output, but does work in raster
displays, PNG, PDF and SVG.
JDH
From: Luc G. <luc...@gm...> - 2010年02月02日 13:53:27
Hello all, 
I am creating radar plots in matplolib and I cannot get transparent polygons.
I have run the examples from the gallery:
http://matplotlib.sourceforge.net/examples/api/radar_chart.html
http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html
The colours show differently on my computer and the polygons are opaque. I have changed
ax.set_alpha(0-1)
ax.fill(theta, d, facecolor=color, alpha=0-1)
plt.Polygon(verts, closed=True, edgecolor='k', alpha=0-1) 
but the transparency doesn't change.
I am running Enthough Python Distribution (EPD 5.0.0) on Mac OS X 10.6.2
Thanks for your help,
Luc
From: Jae-Joon L. <lee...@gm...> - 2010年02月02日 06:08:30
set_position does not work with axes_grid toolkits.
Try something like
ax.LABELPAD = 0
However, note that this (and set_rotation) may not work with
mpl_toolkits in future release of matplotlib as there has been some
significant changes.
Regards,
-JJ
ps. please use "reply to all", so that messages stay inside the list.
On Mon, Feb 1, 2010 at 7:52 PM, Kim Cheung <ec...@gm...> wrote:
> Mr. Lee,
>
> Thanks for the reply.
>
> The position call works with the first example but not the second:
>
> # Example 1
> import pylab
>
> data1=[1,2,3,4,5,6,7]
> data2=[8,9,10,11,12,13,14]
> dates=['01','02','03','04','05','06','07']
>
> pylab.subplot(211)
> pylab.plot(data1, label='Score 2005')
> pylab.plot(data2, label='Num 2006')
> pylab.setp(pylab.gca(), xticklabels=[])
> pylab.ylabel('Score 2')
> pylab.title('Historical Statistics')
> pylab.legend(loc='upper left')
>
> pylab.subplot(212)
> pylab.plot(data1, label='Score 06')
> pylab.plot(data2, label='Num 06')
> pylab.xticks(pylab.arange(7),dates)
> xlabels = pylab.gca().get_xticklabels()
> ylabels = pylab.gca().get_yticklabels()
> pylab.setp(xlabels, 'rotation', 90)
> xlab=pylab.xlabel('Player')
> pylab.setp(xlab, position=(0.2,0.1)) # <=== This line works
> pylab.ylabel('Score 1')
> pylab.legend(loc='upper left')
>
> pylab.show()
>
> But doesn't work in this example:
>
> # Example 2
> from mpl_toolkits.axes_grid.parasite_axes import SubplotHost
> import matplotlib.pyplot as plt
>
> from matplotlib.ticker import MultipleLocator, FormatStrFormatter
>
> if 1:
>  figprops = dict(figsize=(8., 8. / 1.618), dpi=128)
>         # Figure properties
>  adjustprops = dict(left=0.08, bottom=0.12, right=0.79, top=0.96,
> wspace=0.2, hspace=0.2)    # Subplot properties
>
>  fig = plt.figure(**figprops)
>  fig.subplots_adjust(**adjustprops)
>         # Tunes the subplot layout
>
>  host = SubplotHost(fig, 111)
>
>  p0, = host.plot([0, 1, 2], [0, 1, 2], label="Density")
>  ax=host.axis["left"]
>  plt.setp(ax.label, visible=True, text="Density", size=12,
> color=p0.get_color())
>  plt.setp(ax.major_ticklabels, rotation="vertical")
>
>  plt.setp(ax.label, position=(0.2,0.1)) # This line has no effect.
>
>  fig.add_axes(host)
>
>  host.set_xlim(0, 2)
>  host.set_ylim(0, 2)
>  host.legend()
>
>  plt.draw()
>  plt.show()
>
>
>
> Jae-Joon Lee wrote:
>>
>> Are you using the axes_grid toolkit?
>> Standard matplotlib axis instance does not have "major_ticklabels"
>> attribute, while axes_grid axis does.
>>
>> Please post a simple, but complete example that can be run and tested.
>> Regards,
>>
>> -JJ
>>
>>
>> On Sun, Jan 31, 2010 at 11:06 AM, <kc1...@ya...>
>> wrote:
>>
>>>
>>> BTW: I tried to use set_position to change the position of the axes label
>>> as suggested by previous posting. No effect.
>>>
>>> ----- Original Message ----
>>>
>>>>>
>>>>> Hello,
>>>>>
>>>>> I am creating a plot with multiple y-axis (up to 6) and twinx
>>>>>
>>>>
>>>> works pretty well. The problem is that there are too much wasted spaces
>>>> used up
>>>> by the axes. Since I have multiple axes, it cuts into the amount of
>>>> space
>>>> available for the plot area. I need to know how I can squeeze some
>>>> spaces out of
>>>> the standard axes. First thing I discovered was that I can rotate the
>>>> tick
>>>> labels to vertical by:
>>>>
>>>>>
>>>>> plt.setp(ax.major_ticklabels, rotation="vertical")
>>>>>
>>>>> where ax is my y-axis. But then:
>>>>>
>>>>> (1) How to reduce the space between the tick and the axes label?
>>>>>
>>>>> First I tried to place the label on top but couldn't get that to work.
>>>>> Then I
>>>>>
>>>>
>>>> tried to change the position property of the axis label object and that
>>>> have no
>>>> effect. So, can somebody please tell me how I can do these 2 things?
>>>>
>>>>>
>>>>> (2) How to avoid overlapping tick labels?
>>>>>
>>>>> With the way the standard x and y axis are drawn, after I do a vertical
>>>>> rotate
>>>>>
>>>>
>>>> of the y tick labels, the first y tick label overlaps with the last x
>>>> tick label
>>>> since they are both center aligned. Is there any way to change the
>>>> alignment of
>>>> only the first and last tick labels of an axes (while keeping the rest
>>>> center
>>>> aligned)?
>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> John Henry
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The Planet: dedicated and managed hosting, cloud storage, colocation
>>> Stay online with enterprise data centers and the best network in the
>>> business
>>> Choose flexible plans and management services without long-term contracts
>>> Personal 24x7 support from experience hosting pros just a phone call
>>> away.
>>> http://p.sf.net/sfu/theplanet-com
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>>
>
>
> --
> Kim Cheung
>
>
From: Sourav K. M. <sou...@gm...> - 2010年02月02日 05:26:34
On Mon, 2010年02月01日 at 15:23 -1000, Eric Firing wrote:
> Alternatively, and more simply, why make the transparent regions in the 
> first place?
> 
> cs = contourf(rand(10,10), [0.5, 0.7], colors=('b'))
> 
> Here we specify a single pair of limits between which the color will be 
> blue.
Well, that's embarrassing -- if I had read the documentation more
carefully, I would have realized that the levels spec "V" means
different things for "contour" and "contourf".
Thank you again! :)
Regards,
Sourav
From: Michael C. <mc...@ca...> - 2010年02月02日 05:04:25
Hi all,
One of the most persistent problems I have with matplotlib is finding 
out which kwargs and args are available for some commands.
For instance, I am looking at manipulating axis ticks and labels in 
mplot3d, so I went to the mplot3d api page, and looked for useful 
commands and found:
set_xlabel(xlabel, fontdict=None, **kwargs)¶
 Set xlabel.
set_xlim3d(*args, **kwargs)¶
 Set 3D x limits.
However, there is no information that I can find about "args" and 
"kwargs" that I can use to figure out how to make my changes.
For the record, I want to be able to change the size of the font, the # 
and values of the tick marks, and to move the axis labels to one or the 
other end of the axis they are labelling.
Cheers
Michael
From: Eric F. <ef...@ha...> - 2010年02月02日 01:23:37
Sourav K. Mandal wrote:
> Hello,
> 
> (This is a different question for the same project that led me to file a
> bug about alpha blending in "contour" .)
> 
> I want to overlay a number of exclusion regions in a 2D parameter scan.
> I generate each region with contourf in succession, like:
> 
> contourf(x,y,unphys,(1),alpha=1,colors=('w','k'))
> contourf(x,y,excl,(1),alpha=0.5,colors=('w','m'))
> ...
> 
> The problem as you might guess is that if I overlay many regions, the
> white level at each new region washes out the underlying non-white
> colors.
> 
> Is there a "transparent" color I can use instead of white? Or, is there
> an alternative way to overlay regions that avoids this problem?
> 
Until a grand reworking of the alpha mess occurs, here is a (verbose) 
workaround showing how to set regions to be uncolored (transparent):
In [3]:cs = contourf(rand(10,10), colors=('r', 'g', 'b'))
In [4]:cs.levels
Out[4]:array([ 0. , 0.15, 0.3 , 0.45, 0.6 , 0.75, 0.9 , 1.05])
In [5]:cs.collections
Out[5]:<a list of 7 collections.PathCollection objects>
In [6]:cst = cs.collections[::3]
In [7]:for c in cst:
 ...: c.set_color('none')
 ...:
 ...:
In [8]:draw()
Alternatively, and more simply, why make the transparent regions in the 
first place?
cs = contourf(rand(10,10), [0.5, 0.7], colors=('b'))
Here we specify a single pair of limits between which the color will be 
blue.
Eric
From: Sourav K. M. <sou...@gm...> - 2010年02月02日 00:54:08
Hello,
(This is a different question for the same project that led me to file a
bug about alpha blending in "contour" .)
I want to overlay a number of exclusion regions in a 2D parameter scan.
I generate each region with contourf in succession, like:
 contourf(x,y,unphys,(1),alpha=1,colors=('w','k'))
 contourf(x,y,excl,(1),alpha=0.5,colors=('w','m'))
 ...
The problem as you might guess is that if I overlay many regions, the
white level at each new region washes out the underlying non-white
colors.
Is there a "transparent" color I can use instead of white? Or, is there
an alternative way to overlay regions that avoids this problem?
Thank you again!
Best,
Sourav
3 messages has been excluded from this view by a project administrator.

Showing 13 results of 13

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /