From: <md...@us...> - 2008-10-01 14:20:47
|
Revision: 6141 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6141&view=rev Author: mdboom Date: 2008-10-01 14:20:28 +0000 (Wed, 01 Oct 2008) Log Message: ----------- [ 2107138 ] x/yticklabels return value incorrect Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axis.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/lib/matplotlib/axis.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axis.py 2008-10-01 08:04:02 UTC (rev 6140) +++ trunk/matplotlib/lib/matplotlib/axis.py 2008-10-01 14:20:28 UTC (rev 6141) @@ -239,14 +239,12 @@ #t = mtext.Text( trans, vert, horiz = self.axes.get_xaxis_text1_transform(self._pad) size = rcParams['xtick.labelsize'] - t = mtext.TextWithDash( + t = mtext.Text( x=0, y=0, fontproperties=font_manager.FontProperties(size=size), color=rcParams['xtick.color'], verticalalignment=vert, horizontalalignment=horiz, - dashdirection=0, - xaxis=True, ) t.set_transform(trans) @@ -261,13 +259,11 @@ #t = mtext.Text( trans, vert, horiz = self.axes.get_xaxis_text2_transform(self._pad) - t = mtext.TextWithDash( + t = mtext.Text( x=0, y=1, fontproperties=font_manager.FontProperties(size=rcParams['xtick.labelsize']), color=rcParams['xtick.color'], verticalalignment=vert, - dashdirection=1, - xaxis=True, horizontalalignment=horiz, ) t.set_transform(trans) @@ -374,14 +370,12 @@ #t = mtext.Text( trans, vert, horiz = self.axes.get_yaxis_text1_transform(self._pad) - t = mtext.TextWithDash( + t = mtext.Text( x=0, y=0, fontproperties=font_manager.FontProperties(size=rcParams['ytick.labelsize']), color=rcParams['ytick.color'], verticalalignment=vert, horizontalalignment=horiz, - dashdirection=0, - xaxis=False, ) t.set_transform(trans) #t.set_transform( self.axes.transData ) @@ -394,13 +388,11 @@ #t = mtext.Text( trans, vert, horiz = self.axes.get_yaxis_text2_transform(self._pad) - t = mtext.TextWithDash( + t = mtext.Text( x=1, y=0, fontproperties=font_manager.FontProperties(size=rcParams['ytick.labelsize']), color=rcParams['ytick.color'], verticalalignment=vert, - dashdirection=1, - xaxis=False, horizontalalignment=horiz, ) t.set_transform(trans) Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-10-01 08:04:02 UTC (rev 6140) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-10-01 14:20:28 UTC (rev 6141) @@ -846,7 +846,6 @@ dashrotation=None, dashpad=3, dashpush=0, - xaxis=True, ): Text.__init__(self, x=x, y=y, text=text, color=color, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2008-10-06 21:23:01
|
Revision: 6159 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6159&view=rev Author: jdh2358 Date: 2008-10-06 19:18:09 +0000 (Mon, 06 Oct 2008) Log Message: ----------- added resize event support to tkagg Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py trunk/matplotlib/lib/matplotlib/figure.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-10-06 12:06:30 UTC (rev 6158) +++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2008-10-06 19:18:09 UTC (rev 6159) @@ -208,6 +208,7 @@ self._tkphoto = Tk.PhotoImage( master=self._tkcanvas, width=width, height=height) self._tkcanvas.create_image(width/2,height/2,image=self._tkphoto) + self.resize_event() self.show() def draw(self): Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2008-10-06 12:06:30 UTC (rev 6158) +++ trunk/matplotlib/lib/matplotlib/figure.py 2008-10-06 19:18:09 UTC (rev 6159) @@ -711,7 +711,7 @@ def clear(self): """ - Clear the figure + Clear the figure -- synonym for fig.clf """ self.clf() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2008-10-08 19:54:07
|
Revision: 6173 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6173&view=rev Author: jdh2358 Date: 2008-10-08 19:53:57 +0000 (Wed, 08 Oct 2008) Log Message: ----------- fixed deprecation warning in legend Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/legend.py trunk/matplotlib/lib/matplotlib/mlab.py Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2008-10-08 18:16:49 UTC (rev 6172) +++ trunk/matplotlib/lib/matplotlib/legend.py 2008-10-08 19:53:57 UTC (rev 6173) @@ -124,7 +124,7 @@ value=rcParams["legend."+name] setattr(self,name,value) if pad: - warnings.DeprecationWarning("Use 'borderpad' instead of 'pad'.") + warnings.warn("Use 'borderpad' instead of 'pad'.", DeprecationWarning) # 2008/10/04 if self.numpoints <= 0: raise ValueError("numpoints must be >= 0; it was %d"% numpoints) Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-08 18:16:49 UTC (rev 6172) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-10-08 19:53:57 UTC (rev 6173) @@ -1799,8 +1799,9 @@ def rec_join(key, r1, r2, jointype='inner', defaults=None, r1postfix='1', r2postfix='2'): """ - join record arrays r1 and r2 on key; key is a tuple of field - names. If r1 and r2 have equal values on all the keys in the key + join record arrays r1 and r2 on key; key is a tuple of field names + -- if key is a string it is assumed to be a single attribute + name. If r1 and r2 have equal values on all the keys in the key tuple, then their fields will be merged into a new record array containing the intersection of the fields of r1 and r2. @@ -1812,10 +1813,13 @@ The defaults keyword is a dictionary filled with {column_name:default_value} pairs. - The keywords r1postfix and r2postfix are postfixed to column names + The keywords r1postfix and r2postfix are postfixed to column names (other than keys) that are both in r1 and r2. """ + if cbook.is_string_like(key): + key = (key, ) + for name in key: if name not in r1.dtype.names: raise ValueError('r1 does not have key field %s'%name) @@ -1862,7 +1866,7 @@ keydesc = [key_desc(name) for name in key] - + def mapped_r1field(name): """ the column name in newrec that corresponds to the colmn in r1 """ if name in key or name not in r2.dtype.names: return name This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-10-23 17:21:53
|
Revision: 6311 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6311&view=rev Author: mdboom Date: 2008-10-23 17:21:49 +0000 (Thu, 23 Oct 2008) Log Message: ----------- Fix collections property list. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/artist.py trunk/matplotlib/lib/matplotlib/collections.py Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2008-10-23 16:38:04 UTC (rev 6310) +++ trunk/matplotlib/lib/matplotlib/artist.py 2008-10-23 17:21:49 UTC (rev 6311) @@ -651,7 +651,7 @@ if not self.is_alias(func): continue docstring = func.__doc__ fullname = docstring[10:] - aliases[fullname[4:]] = name[4:] + aliases.setdefault(fullname[4:], []).append(name[4:]) return aliases _get_valid_values_regex = re.compile(r"\n\s*ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))") @@ -731,8 +731,10 @@ """ if s in self.aliasd: - return ':meth:`%s <%s>` or %s' % (s, target, self.aliasd[s]) - else: return ':meth:`%s <%s>`' % (s, target) + aliases = ''.join([' or %s' % x for x in self.aliasd[s]]) + else: + aliases = '' + return ':meth:`%s <%s>`%s' % (s, target, aliases) def pprint_setters(self, prop=None, leadingspace=2): """ Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2008-10-23 16:38:04 UTC (rev 6310) +++ trunk/matplotlib/lib/matplotlib/collections.py 2008-10-23 17:21:49 UTC (rev 6311) @@ -253,7 +253,7 @@ else: return self._uniform_offsets - def set_linewidths(self, lw): + def set_linewidth(self, lw): """ Set the linewidth(s) for the collection. *lw* can be a scalar or a sequence; if it is a sequence the patches will cycle @@ -263,11 +263,18 @@ """ if lw is None: lw = mpl.rcParams['patch.linewidth'] self._linewidths = self._get_value(lw) - set_lw = set_linewidth = set_linewidths - def set_linestyles(self, ls): + def set_linewidths(self, lw): + """alias for set_linewidth""" + return self.set_linewidth(lw) + + def set_lw(self, lw): + """alias for set_linewidth""" + return self.set_linewidth(lw) + + def set_linestyle(self, ls): """ - Set the linestyles(s) for the collection. + Set the linestyle(s) for the collection. ACCEPTS: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ] @@ -306,8 +313,15 @@ except ValueError: raise ValueError('Do not know how to convert %s to dashes'%ls) self._linestyles = dashes - set_dashes = set_linestyle = set_linestyles + def set_linestyles(self, ls): + """alias for set_linestyle""" + return self.set_linestyle(ls) + + def set_dashes(self, ls): + """alias for set_linestyle""" + return self.set_linestyle(ls) + def set_antialiased(self, aa): """ Set the antialiasing state for rendering. @@ -317,8 +331,11 @@ if aa is None: aa = mpl.rcParams['patch.antialiased'] self._antialiaseds = self._get_bool(aa) - set_antialiaseds = set_antialiased + def set_antialiaseds(self, aa): + """alias for set_antialiased""" + return self.set_antialiased(aa) + def set_color(self, c): """ Set both the edgecolor and the facecolor. @@ -344,7 +361,9 @@ self._facecolors_original = c self._facecolors = _colors.colorConverter.to_rgba_array(c, self._alpha) - set_facecolors = set_facecolor + def set_facecolors(self, c): + """alias for set_facecolor""" + return self.set_facecolor(c) def get_facecolor(self): return self._facecolors @@ -377,7 +396,9 @@ self._edgecolors_original = c self._edgecolors = _colors.colorConverter.to_rgba_array(c, self._alpha) - set_edgecolors = set_edgecolor + def set_edgecolors(self, c): + """alias for set_edgecolor""" + return self.set_edgecolor(c) def set_alpha(self, alpha): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-10-29 13:51:56
|
Revision: 6345 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6345&view=rev Author: mdboom Date: 2008-10-29 13:51:47 +0000 (Wed, 29 Oct 2008) Log Message: ----------- [204515] References to __doc__ break with -OO and in py2exe Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/scale.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-29 03:36:27 UTC (rev 6344) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-29 13:51:47 UTC (rev 6345) @@ -5392,7 +5392,7 @@ def barbs(self, *args, **kw): """ - %s + %(barbs_doc)s **Example:** .. plot:: mpl_examples/pylab_examples/barb_demo.py @@ -5403,7 +5403,8 @@ self.update_datalim(b.get_offsets()) self.autoscale_view() return b - barbs.__doc__ = cbook.dedent(barbs.__doc__) % mquiver.Barbs.barbs_doc + barbs.__doc__ = cbook.dedent(barbs.__doc__) % { + 'barbs_doc': mquiver.Barbs.barbs_doc} def fill(self, *args, **kwargs): """ Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2008-10-29 03:36:27 UTC (rev 6344) +++ trunk/matplotlib/lib/matplotlib/figure.py 2008-10-29 13:51:47 UTC (rev 6345) @@ -563,7 +563,7 @@ sets the projection type of the axes. (For backward compatibility, ``polar=True`` may also be provided, which is equivalent to ``projection='polar'``). Valid values for - *projection* are: %s. Some of these projections support + *projection* are: %(list)s. Some of these projections support additional kwargs, which may be provided to :meth:`add_axes`:: rect = l,b,w,h @@ -589,7 +589,7 @@ The following kwargs are supported: - %s + %(Axes)s """ key = self._make_key(*args, **kwargs) @@ -623,8 +623,9 @@ self._seen[key] = a return a - add_axes.__doc__ = add_axes.__doc__ % (", ".join(get_projection_names()), '%(Axes)s') - add_axes.__doc__ = dedent(add_axes.__doc__) % artist.kwdocd + add_axes.__doc__ = dedent(add_axes.__doc__) % \ + {'list': (", ".join(get_projection_names())), + 'Axes': artist.kwdocd['Axes']} def add_subplot(self, *args, **kwargs): """ @@ -640,7 +641,7 @@ *projection*, which chooses a projection type for the axes. (For backward compatibility, *polar=True* may also be provided, which is equivalent to *projection='polar'*). Valid - values for *projection* are: %s. Some of these projections + values for *projection* are: %(list)s. Some of these projections support additional *kwargs*, which may be provided to :meth:`add_axes`. @@ -651,7 +652,8 @@ return it. The following kwargs are supported: - %s + + %(Axes)s """ key = self._make_key(*args, **kwargs) @@ -685,8 +687,9 @@ self.sca(a) self._seen[key] = a return a - add_subplot.__doc__ = dedent(add_subplot.__doc__) % ( - ", ".join(get_projection_names()), "%(Axes)s") % artist.kwdocd + add_subplot.__doc__ = dedent(add_subplot.__doc__) % { + 'list': ", ".join(get_projection_names()), + 'Axes': artist.kwdocd['Axes']} def clf(self): """ Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 03:36:27 UTC (rev 6344) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 13:51:47 UTC (rev 6345) @@ -1634,7 +1634,7 @@ kwdoc["AvailableBoxstyles"]=" | ".join([l \ for l in _list_available_boxstyles(_fancy_bbox_transmuters)]) kwdoc.update(artist.kwdocd) - set_boxstyle.__doc__ = set_boxstyle.__doc__ % kwdoc + set_boxstyle.__doc__ = cbook.dedent(set_boxstyle.__doc__) % kwdoc del kwdoc def set_mutation_scale(self, scale): Modified: trunk/matplotlib/lib/matplotlib/scale.py =================================================================== --- trunk/matplotlib/lib/matplotlib/scale.py 2008-10-29 03:36:27 UTC (rev 6344) +++ trunk/matplotlib/lib/matplotlib/scale.py 2008-10-29 13:51:47 UTC (rev 6345) @@ -401,7 +401,7 @@ """ Return a scale class by name. - ACCEPTS: [ %s ] + ACCEPTS: [ %(names)s ] """ scale = scale.lower() if scale is None: @@ -411,7 +411,8 @@ raise ValueError("Unknown scale type '%s'" % scale) return _scale_mapping[scale](axis, **kwargs) -scale_factory.__doc__ = scale_factory.__doc__ % " | ".join(get_scale_names()) +scale_factory.__doc__ = dedent(scale_factory.__doc__) % \ + {'names': " | ".join(get_scale_names())} def register_scale(scale_class): """ @@ -431,7 +432,8 @@ docs.append(" '%s'" % name) docs.append("") class_docs = dedent(scale_class.__init__.__doc__) - class_docs = "".join([" %s\n" % x for x in class_docs.split("\n")]) + class_docs = "".join([" %s\n" % + x for x in class_docs.split("\n")]) docs.append(class_docs) docs.append("") return "\n".join(docs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-10-29 16:43:08
|
Revision: 6346 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6346&view=rev Author: mdboom Date: 2008-10-29 16:43:05 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Minor fixes to text docstrings, and to make getters and setters completely symmetric. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 13:51:47 UTC (rev 6345) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 16:43:05 UTC (rev 6346) @@ -1383,7 +1383,7 @@ """ Simple square box. - 'pad' :an amount of padding. + *pad*: an amount of padding. """ def __init__(self, pad=0.3): Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-10-29 13:51:47 UTC (rev 6345) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-10-29 16:43:05 UTC (rev 6346) @@ -176,7 +176,6 @@ self._linespacing = linespacing self.update(kwargs) #self.set_bbox(dict(pad=0)) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def contains(self,mouseevent): """Test whether the mouse event occurred in the patch. @@ -441,10 +440,14 @@ "Return the color of the text" return self._color - def get_font_properties(self): + def get_fontproperties(self): "Return the :class:`~font_manager.FontProperties` object" return self._fontproperties + def get_font_properties(self): + 'alias for get_fontproperties' + return self.get_fontproperties + def get_family(self): "Return the list of font families used for font lookup" return self._fontproperties.get_family() @@ -687,6 +690,10 @@ """ self._fontproperties.set_variant(variant) + def set_fontvariant(self, variant): + 'alias for set_variant' + return self.set_variant(variant) + def set_name(self, fontname): """alias for set_family""" return self.set_family(fontname) @@ -832,7 +839,12 @@ fp = FontProperties(fp) self._fontproperties = fp.copy() + def set_font_properties(self, fp): + 'alias for set_fontproperties' + self.set_fontproperties(fp) + artist.kwdocd['Text'] = artist.kwdoc(Text) +Text.__init__.im_func.__doc__ = cbook.dedent(Text.__init__.__doc__) % artist.kwdocd class TextWithDash(Text): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2008-10-29 18:27:07
|
Revision: 6350 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6350&view=rev Author: mdboom Date: 2008-10-29 18:27:05 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Speed up quadmesh drawing. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/path.py Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2008-10-29 18:26:34 UTC (rev 6349) +++ trunk/matplotlib/lib/matplotlib/collections.py 2008-10-29 18:27:05 UTC (rev 6350) @@ -551,12 +551,6 @@ else: c = coordinates - # We could let the Path constructor generate the codes for us, - # but this is faster, since we know they'll always be the same - codes = np.array( - [Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY], - Path.code_type) - points = np.concatenate(( c[0:-1, 0:-1], c[0:-1, 1: ], @@ -565,7 +559,7 @@ c[0:-1, 0:-1] ), axis=2) points = points.reshape((meshWidth * meshHeight, 5, 2)) - return [Path(x, codes) for x in points] + return [Path(x) for x in points] convert_mesh_to_paths = staticmethod(convert_mesh_to_paths) def get_datalim(self, transData): Modified: trunk/matplotlib/lib/matplotlib/path.py =================================================================== --- trunk/matplotlib/lib/matplotlib/path.py 2008-10-29 18:26:34 UTC (rev 6349) +++ trunk/matplotlib/lib/matplotlib/path.py 2008-10-29 18:27:05 UTC (rev 6350) @@ -111,6 +111,7 @@ self.should_simplify = (len(vertices) >= 128 and (codes is None or np.all(codes <= Path.LINETO))) + self.has_nonfinite = not np.isfinite(vertices).all() self.codes = codes self.vertices = vertices @@ -183,13 +184,18 @@ for v in vertices[1:]: yield v, LINETO elif codes is None: - next_code = MOVETO - for v in vertices: - if (~isfinite(v)).any(): - next_code = MOVETO - else: - yield v, next_code - next_code = LINETO + if self.has_nonfinite: + next_code = MOVETO + for v in vertices: + if np.isfinite(v).all(): + yield v, next_code + next_code = LINETO + else: + next_code = MOVETO + else: + yield vertices[0], MOVETO + for v in vertices[1:]: + yield v, LINETO else: i = 0 was_nan = False @@ -203,7 +209,7 @@ else: num_vertices = NUM_VERTICES[int(code)] curr_vertices = vertices[i:i+num_vertices].flatten() - if (~isfinite(curr_vertices)).any(): + if not isfinite(curr_vertices).all(): was_nan = True elif was_nan: yield curr_vertices[-2:], MOVETO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2008-11-26 19:00:03
|
Revision: 6455 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6455&view=rev Author: jdh2358 Date: 2008-11-26 18:59:58 +0000 (Wed, 26 Nov 2008) Log Message: ----------- fixed leave_notify_event for gtk -- need support for other UIs Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-11-26 17:43:09 UTC (rev 6454) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-11-26 18:59:58 UTC (rev 6455) @@ -744,7 +744,7 @@ ydata = None # y coord of mouse in data coords # the last event that was triggered before this one - _lastevent = None + lastevent = None def __init__(self, name, canvas, x, y,guiEvent=None): """ @@ -789,11 +789,10 @@ def _update_enter_leave(self): 'process the figure/axes enter leave events' - if LocationEvent._lastevent is not None: - last = LocationEvent._lastevent + if LocationEvent.lastevent is not None: + last = LocationEvent.lastevent if last.canvas!=self.canvas: # process figure enter/leave event - last.canvas.callbacks.process('figure_leave_event', last) self.canvas.callbacks.process('figure_enter_event', self) if last.inaxes!=self.inaxes: # process axes enter/leave events @@ -810,7 +809,7 @@ self.canvas.callbacks.process('axes_enter_event', self) - LocationEvent._lastevent = self + LocationEvent.lastevent = self @@ -1205,6 +1204,19 @@ guiEvent=guiEvent) self.callbacks.process(s, event) + def leave_notify_event(self, guiEvent=None): + """ + Backend derived classes should call this function when leaving + canvas + + *guiEvent* + the native UI event that generated the mpl event + + """ + self.callbacks.process('figure_leave_event', LocationEvent.lastevent) + LocationEvent.lastevent = None + + def idle_event(self, guiEvent=None): 'call when GUI is idle' s = 'idle_event' Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-11-26 17:43:09 UTC (rev 6454) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-11-26 18:59:58 UTC (rev 6455) @@ -170,6 +170,7 @@ self.connect('key_press_event', self.key_press_event) self.connect('key_release_event', self.key_release_event) self.connect('motion_notify_event', self.motion_notify_event) + self.connect('leave_notify_event', self.leave_notify_event) self.set_events(self.__class__.event_mask) @@ -239,6 +240,9 @@ FigureCanvasBase.motion_notify_event(self, x, y) return False # finish event propagation? + def leave_notify_event(self, widget, event): + FigureCanvasBase.leave_notify_event(self, event) + def _get_key(self, event): if event.keyval in self.keyvald: key = self.keyvald[event.keyval] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2008-12-02 15:40:49
|
Revision: 6468 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6468&view=rev Author: jdh2358 Date: 2008-12-02 15:40:44 +0000 (Tue, 02 Dec 2008) Log Message: ----------- added gregor's wx enter/leave patch - fixed figure_enter problem Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py trunk/matplotlib/lib/matplotlib/backends/backend_wx.py Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-02 15:32:07 UTC (rev 6467) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-02 15:40:44 UTC (rev 6468) @@ -791,9 +791,6 @@ 'process the figure/axes enter leave events' if LocationEvent.lastevent is not None: last = LocationEvent.lastevent - if last.canvas!=self.canvas: - # process figure enter/leave event - self.canvas.callbacks.process('figure_enter_event', self) if last.inaxes!=self.inaxes: # process axes enter/leave events if last.inaxes is not None: @@ -803,8 +800,6 @@ else: # process a figure enter event - self.canvas.callbacks.process('figure_enter_event', self) - # process an axes enter event if we are over an axes if self.inaxes is not None: self.canvas.callbacks.process('axes_enter_event', self) @@ -952,8 +947,6 @@ 'pick_event', 'idle_event', 'figure_enter_event', - # todo: we only process this when a mouse enters a different - # figure -- we need to connect to the GUI leavel event 'figure_leave_event', 'axes_enter_event', 'axes_leave_event' @@ -1216,7 +1209,18 @@ self.callbacks.process('figure_leave_event', LocationEvent.lastevent) LocationEvent.lastevent = None + def enter_notify_event(self, guiEvent=None): + """ + Backend derived classes should call this function when entering + canvas + *guiEvent* + the native UI event that generated the mpl event + + """ + event = Event('figure_enter_event', self, guiEvent) + self.callbacks.process('figure_enter_event', event) + def idle_event(self, guiEvent=None): 'call when GUI is idle' s = 'idle_event' Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-12-02 15:32:07 UTC (rev 6467) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008-12-02 15:40:44 UTC (rev 6468) @@ -147,6 +147,7 @@ gdk.EXPOSURE_MASK | gdk.KEY_PRESS_MASK | gdk.KEY_RELEASE_MASK | + gdk.ENTER_NOTIFY_MASK | gdk.LEAVE_NOTIFY_MASK | gdk.POINTER_MOTION_MASK | gdk.POINTER_MOTION_HINT_MASK) @@ -171,6 +172,7 @@ self.connect('key_release_event', self.key_release_event) self.connect('motion_notify_event', self.motion_notify_event) self.connect('leave_notify_event', self.leave_notify_event) + self.connect('enter_notify_event', self.enter_notify_event) self.set_events(self.__class__.event_mask) @@ -243,6 +245,9 @@ def leave_notify_event(self, widget, event): FigureCanvasBase.leave_notify_event(self, event) + def enter_notify_event(self, widget, event): + FigureCanvasBase.enter_notify_event(self, event) + def _get_key(self, event): if event.keyval in self.keyvald: key = self.keyvald[event.keyval] Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-12-02 15:32:07 UTC (rev 6467) +++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008-12-02 15:40:44 UTC (rev 6468) @@ -1263,10 +1263,10 @@ FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=evt) def _onLeave(self, evt): - """Mouse has left the window; fake a motion event.""" + """Mouse has left the window.""" evt.Skip() - FigureCanvasBase.motion_notify_event(self, -1, -1, guiEvent=evt) + FigureCanvasBase.leave_notify_event(self, guiEvent = evt) ######################################################################## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-08 12:26:58
|
Revision: 6505 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6505&view=rev Author: jouni Date: 2008-12-08 12:26:53 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Fix SymmetricalLogLocator bug that caused platform-specific behavior Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/scale.py trunk/matplotlib/lib/matplotlib/type1font.py Modified: trunk/matplotlib/lib/matplotlib/scale.py =================================================================== --- trunk/matplotlib/lib/matplotlib/scale.py 2008-12-07 20:52:13 UTC (rev 6504) +++ trunk/matplotlib/lib/matplotlib/scale.py 2008-12-08 12:26:53 UTC (rev 6505) @@ -301,7 +301,8 @@ self._linadjust = (np.log(linthresh) / self._log_base) / linthresh def transform(self, a): - sign = np.sign(np.asarray(a)) + a = np.asarray(a) + sign = np.sign(a) masked = ma.masked_inside(a, -self.linthresh, self.linthresh, copy=False) log = sign * ma.log(np.abs(masked)) / self._log_base if masked.mask.any(): Modified: trunk/matplotlib/lib/matplotlib/type1font.py =================================================================== --- trunk/matplotlib/lib/matplotlib/type1font.py 2008-12-07 20:52:13 UTC (rev 6504) +++ trunk/matplotlib/lib/matplotlib/type1font.py 2008-12-08 12:26:53 UTC (rev 6505) @@ -17,6 +17,7 @@ Systems Incorporated, third printing, v1.1, 1993. ISBN 0-201-57044-0. """ +import re import struct class Type1Font(object): @@ -28,6 +29,7 @@ finally: file.close() self.parts = self._split(data) + self._parse() def _read(self, file): rawdata = file.read() @@ -97,8 +99,86 @@ return data[:len1], binary, data[idx:] + _whitespace = re.compile(r'[\0\t\r\014\n ]+') + _delim = re.compile(r'[()<>[]{}/%]') + _token = re.compile(r'/{0,2}[^]\0\t\r\v\n ()<>{}/%[]+') + _comment = re.compile(r'%[^\r\n\v]*') + _instring = re.compile(r'[()\\]') + def _parse(self): + """ + A very limited kind of parsing to find the Encoding of the + font. + """ + def tokens(text): + """ + Yield pairs (position, token), ignoring comments and + whitespace. Numbers count as tokens. + """ + pos = 0 + while pos < len(text): + match = self._comment.match(text[pos:]) or self._whitespace.match(text[pos:]) + if match: + pos += match.end() + elif text[pos] == '(': + start = pos + pos += 1 + depth = 1 + while depth: + match = self._instring.search(text[pos:]) + if match is None: return + if match.group() == '(': + depth += 1 + pos += 1 + elif match.group() == ')': + depth -= 1 + pos += 1 + else: + pos += 2 + yield (start, text[start:pos]) + elif text[pos:pos+2] in ('<<', '>>'): + yield (pos, text[pos:pos+2]) + pos += 2 + elif text[pos] == '<': + start = pos + pos += text[pos:].index('>') + yield (start, text[start:pos]) + else: + match = self._token.match(text[pos:]) + if match: + yield (pos, match.group()) + pos += match.end() + else: + yield (pos, text[pos]) + pos += 1 + + enc_starts, enc_ends = None, None + state = 0 + # State transitions: + # 0 -> /Encoding -> 1 + # 1 -> StandardEncoding -> 2 -> def -> (ends) + # 1 -> dup -> 4 -> put -> 5 + # 5 -> dup -> 4 -> put -> 5 + # 5 -> def -> (ends) + for pos,token in tokens(self.parts[0]): + if state == 0 and token == '/Encoding': + enc_starts = pos + state = 1 + elif state == 1 and token == 'StandardEncoding': + state = 2 + elif state in (2,5) and token == 'def': + enc_ends = pos+3 + break + elif state in (1,5) and token == 'dup': + state = 4 + elif state == 4 and token == 'put': + state = 5 + self.enc_starts, self.enc_ends = enc_starts, enc_ends + + if __name__ == '__main__': import sys font = Type1Font(sys.argv[1]) parts = font.parts print len(parts[0]), len(parts[1]), len(parts[2]) + print parts[0][font.enc_starts:font.enc_ends] + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-08 12:31:08
|
Revision: 6506 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6506&view=rev Author: jouni Date: 2008-12-08 12:31:06 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Other part of symlog bugfix (and deactivating an experimental type1font that slipped in by accident) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/scale.py trunk/matplotlib/lib/matplotlib/type1font.py Modified: trunk/matplotlib/lib/matplotlib/scale.py =================================================================== --- trunk/matplotlib/lib/matplotlib/scale.py 2008-12-08 12:26:53 UTC (rev 6505) +++ trunk/matplotlib/lib/matplotlib/scale.py 2008-12-08 12:31:06 UTC (rev 6506) @@ -329,6 +329,7 @@ self._linadjust = linthresh / (np.log(linthresh) / self._log_base) def transform(self, a): + a = np.asarray(a) return np.where(a <= self._log_linthresh, np.where(a >= -self._log_linthresh, a * self._linadjust, Modified: trunk/matplotlib/lib/matplotlib/type1font.py =================================================================== --- trunk/matplotlib/lib/matplotlib/type1font.py 2008-12-08 12:26:53 UTC (rev 6505) +++ trunk/matplotlib/lib/matplotlib/type1font.py 2008-12-08 12:31:06 UTC (rev 6506) @@ -29,7 +29,7 @@ finally: file.close() self.parts = self._split(data) - self._parse() + #self._parse() def _read(self, file): rawdata = file.read() @@ -180,5 +180,5 @@ font = Type1Font(sys.argv[1]) parts = font.parts print len(parts[0]), len(parts[1]), len(parts[2]) - print parts[0][font.enc_starts:font.enc_ends] + #print parts[0][font.enc_starts:font.enc_ends] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ry...@us...> - 2008-12-08 21:15:23
|
Revision: 6518 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6518&view=rev Author: ryanmay Date: 2008-12-08 21:15:13 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Update spectral methods (psd, csd, etc.) to scale one-sided densities by a factor of 2 and, optionally, scale all densities by the sampling frequency. This gives better MatLab compatibility. Update corresponding Axes methods, and make Axes.psd() label the y-axis of the plot as appropriate. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/mlab.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-12-08 21:06:49 UTC (rev 6517) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-12-08 21:15:13 UTC (rev 6518) @@ -6719,13 +6719,13 @@ def psd(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, - sides='default', **kwargs): + sides='default', scale_by_freq=None, **kwargs): """ call signature:: psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, - sides='default', **kwargs) + sides='default', scale_by_freq=None, **kwargs) The power spectral density by Welch's average periodogram method. The vector *x* is divided into *NFFT* length @@ -6764,13 +6764,18 @@ """ if not self._hold: self.cla() pxx, freqs = mlab.psd(x, NFFT, Fs, detrend, window, noverlap, pad_to, - sides) + sides, scale_by_freq) pxx.shape = len(freqs), freqs += Fc + if scale_by_freq in (None, True): + psd_units = 'dB/Hz' + else: + psd_units = 'dB' + self.plot(freqs, 10*np.log10(pxx), **kwargs) self.set_xlabel('Frequency') - self.set_ylabel('Power Spectrum (dB)') + self.set_ylabel('Power Spectral Density (%s)' % psd_units) self.grid(True) vmin, vmax = self.viewLim.intervaly intv = vmax-vmin @@ -6791,13 +6796,13 @@ def csd(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, - sides='default', **kwargs): + sides='default', scale_by_freq=None, **kwargs): """ call signature:: csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, - sides='default', **kwargs) + sides='default', scale_by_freq=None, **kwargs) The cross spectral density :math:`P_{xy}` by Welch's average periodogram method. The vectors *x* and *y* are divided into @@ -6837,7 +6842,7 @@ """ if not self._hold: self.cla() pxy, freqs = mlab.csd(x, y, NFFT, Fs, detrend, window, noverlap, - pad_to, sides) + pad_to, sides, scale_by_freq) pxy.shape = len(freqs), # pxy is complex freqs += Fc @@ -6859,13 +6864,13 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, - sides='default', **kwargs): + sides='default', scale_by_freq=None, **kwargs): """ call signature:: cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none, window = mlab.window_hanning, noverlap=0, pad_to=None, - sides='default', **kwargs) + sides='default', scale_by_freq=None, **kwargs) cohere the coherence between *x* and *y*. Coherence is the normalized cross spectral density: @@ -6902,7 +6907,8 @@ .. plot:: mpl_examples/pylab_examples/cohere_demo.py """ if not self._hold: self.cla() - cxy, freqs = mlab.cohere(x, y, NFFT, Fs, detrend, window, noverlap) + cxy, freqs = mlab.cohere(x, y, NFFT, Fs, detrend, window, noverlap, + scale_by_freq) freqs += Fc self.plot(freqs, cxy, **kwargs) @@ -6915,13 +6921,15 @@ def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, - cmap=None, xextent=None, pad_to=None, sides='default'): + cmap=None, xextent=None, pad_to=None, sides='default', + scale_by_freq=None): """ call signature:: specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, - cmap=None, xextent=None, pad_to=None, sides='default') + cmap=None, xextent=None, pad_to=None, sides='default', + scale_by_freq=None) Compute a spectrogram of data in *x*. Data are split into *NFFT* length segments and the PSD of each section is @@ -6965,7 +6973,7 @@ if not self._hold: self.cla() Pxx, freqs, bins = mlab.specgram(x, NFFT, Fs, detrend, - window, noverlap, pad_to, sides) + window, noverlap, pad_to, sides, scale_by_freq) Z = 10. * np.log10(Pxx) Z = np.flipud(Z) Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2008-12-08 21:06:49 UTC (rev 6517) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-12-08 21:15:13 UTC (rev 6518) @@ -243,14 +243,15 @@ #This is a helper function that implements the commonality between the #psd, csd, and spectrogram. It is *NOT* meant to be used outside of mlab def _spectral_helper(x, y, NFFT=256, Fs=2, detrend=detrend_none, - window=window_hanning, noverlap=0, pad_to=None, sides='default'): + window=window_hanning, noverlap=0, pad_to=None, sides='default', + scale_by_freq=None): #The checks for if y is x are so that we can use the same function to #implement the core of psd(), csd(), and spectrogram() without doing #extra calculations. We return the unaveraged Pxy, freqs, and t. + same_data = y is x #Make sure we're dealing with a numpy array. If y and x were the same #object to start with, keep them that way - same_data = y is x x = np.asarray(x) if not same_data: @@ -270,15 +271,31 @@ if pad_to is None: pad_to = NFFT + if scale_by_freq is None: + warnings.warn("psd, csd, and specgram have changed to scale their " + "densities by the sampling frequency for better MatLab " + "compatibility. You can pass scale_by_freq=False to disable " + "this behavior. Also, one-sided densities are scaled by a " + "factor of 2.") + scale_by_freq = True + # For real x, ignore the negative frequencies unless told otherwise if (sides == 'default' and np.iscomplexobj(x)) or sides == 'twosided': numFreqs = pad_to + scaling_factor = 1. elif sides in ('default', 'onesided'): numFreqs = pad_to//2 + 1 + scaling_factor = 2. else: raise ValueError("sides must be one of: 'default', 'onesided', or " "'twosided'") + # Matlab divides by the sampling frequency so that density function + # has units of dB/Hz and can be integrated by the plotted frequency + # values. Perform the same scaling here. + if scale_by_freq: + scaling_factor /= Fs + if cbook.iterable(window): assert(len(window) == NFFT) windowVals = window @@ -305,8 +322,10 @@ Pxy[:,i] = np.conjugate(fx[:numFreqs]) * fy[:numFreqs] # Scale the spectrum by the norm of the window to compensate for - # windowing loss; see Bendat & Piersol Sec 11.5.2 - Pxy /= (np.abs(windowVals)**2).sum() + # windowing loss; see Bendat & Piersol Sec 11.5.2. Also include + # scaling factors for one-sided densities and dividing by the sampling + # frequency, if desired. + Pxy *= scaling_factor / (np.abs(windowVals)**2).sum() t = 1./Fs * (ind + NFFT / 2.) freqs = float(Fs) / pad_to * np.arange(numFreqs) @@ -363,12 +382,18 @@ *sides*: [ 'default' | 'onesided' | 'twosided' ] Specifies which sides of the PSD to return. Default gives the default behavior, which returns one-sided for real data and both - for complex data. 'one' forces the return of a one-sided PSD, while - 'both' forces two-sided. + for complex data. 'onesided' forces the return of a one-sided PSD, + while 'twosided' forces two-sided. + + *scale_by_freq*: boolean + Specifies whether the resulting density values should be scaled + by the scaling frequency, which gives density in units of Hz^-1. + This allows for integration over the returned frequency values. + The default is True for MatLab compatibility. """ -def psd(x, NFFT=256, Fs=2, detrend=detrend_none, - window=window_hanning, noverlap=0, pad_to=None, sides='default'): +def psd(x, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, + noverlap=0, pad_to=None, sides='default', scale_by_freq=None): """ The power spectral density by Welch's average periodogram method. The vector *x* is divided into *NFFT* length blocks. Each block @@ -388,13 +413,14 @@ Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley & Sons (1986) """ - Pxx,freqs = csd(x, x, NFFT, Fs, detrend, window, noverlap, pad_to, sides) + Pxx,freqs = csd(x, x, NFFT, Fs, detrend, window, noverlap, pad_to, sides, + scale_by_freq) return Pxx.real,freqs psd.__doc__ = psd.__doc__ % kwdocd -def csd(x, y, NFFT=256, Fs=2, detrend=detrend_none, - window=window_hanning, noverlap=0, pad_to=None, sides='default'): +def csd(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, + noverlap=0, pad_to=None, sides='default', scale_by_freq=None): """ The cross power spectral density by Welch's average periodogram method. The vectors *x* and *y* are divided into *NFFT* length @@ -417,7 +443,7 @@ Procedures, John Wiley & Sons (1986) """ Pxy, freqs, t = _spectral_helper(x, y, NFFT, Fs, detrend, window, - noverlap, pad_to, sides) + noverlap, pad_to, sides, scale_by_freq) if len(Pxy.shape) == 2 and Pxy.shape[1]>1: Pxy = Pxy.mean(axis=1) @@ -425,9 +451,8 @@ csd.__doc__ = csd.__doc__ % kwdocd -def specgram(x, NFFT=256, Fs=2, detrend=detrend_none, - window=window_hanning, noverlap=128, pad_to=None, - sides='default'): +def specgram(x, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, + noverlap=128, pad_to=None, sides='default', scale_by_freq=None): """ Compute a spectrogram of data in *x*. Data are split into *NFFT* length segements and the PSD of each section is computed. The @@ -458,7 +483,7 @@ assert(NFFT > noverlap) Pxx, freqs, t = _spectral_helper(x, x, NFFT, Fs, detrend, window, - noverlap, pad_to, sides) + noverlap, pad_to, sides, scale_by_freq) Pxx = Pxx.real #Needed since helper implements generically if (np.iscomplexobj(x) and sides == 'default') or sides == 'twosided': @@ -473,8 +498,8 @@ _coh_error = """Coherence is calculated by averaging over *NFFT* length segments. Your signal is too short for your choice of *NFFT*. """ -def cohere(x, y, NFFT=256, Fs=2, detrend=detrend_none, - window=window_hanning, noverlap=0, pad_to=None, sides='default'): +def cohere(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, + noverlap=0, pad_to=None, sides='default', scale_by_freq=None): """ The coherence between *x* and *y*. Coherence is the normalized cross spectral density: @@ -487,7 +512,9 @@ Array or sequence containing the data %(PSD)s The return value is the tuple (*Cxy*, *f*), where *f* are the - frequencies of the coherence vector. + frequencies of the coherence vector. For cohere, scaling the + individual densities by the sampling frequency has no effect, since + the factors cancel out. .. seealso:: :func:`psd` and :func:`csd`: @@ -497,9 +524,12 @@ if len(x)<2*NFFT: raise ValueError(_coh_error) - Pxx, f = psd(x, NFFT, Fs, detrend, window, noverlap, pad_to, sides) - Pyy, f = psd(y, NFFT, Fs, detrend, window, noverlap, pad_to, sides) - Pxy, f = csd(x, y, NFFT, Fs, detrend, window, noverlap, pad_to, sides) + Pxx, f = psd(x, NFFT, Fs, detrend, window, noverlap, pad_to, sides, + scale_by_freq) + Pyy, f = psd(y, NFFT, Fs, detrend, window, noverlap, pad_to, sides, + scale_by_freq) + Pxy, f = csd(x, y, NFFT, Fs, detrend, window, noverlap, pad_to, sides, + scale_by_freq) Cxy = np.divide(np.absolute(Pxy)**2, Pxx*Pyy) Cxy.shape = (len(f),) @@ -3246,4 +3276,3 @@ c2x, c2y = c1x + 1./3. * (q2x - q0x), c1y + 1./3. * (q2y - q0y) # c3x, c3y = q2x, q2y return q0x, q0y, c1x, c1y, c2x, c2y, q2x, q2y - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2008-12-08 21:54:54
|
Revision: 6522 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6522&view=rev Author: jdh2358 Date: 2008-12-08 21:54:22 +0000 (Mon, 08 Dec 2008) Log Message: ----------- fixed some doc formatting errors Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/legend.py trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2008-12-08 21:27:40 UTC (rev 6521) +++ trunk/matplotlib/lib/matplotlib/legend.py 2008-12-08 21:54:22 UTC (rev 6522) @@ -123,10 +123,9 @@ Optional keyword arguments: - ================ ================================================= + ================ ================================================================== Keyword Description - ================ ================================================= - + ================ ================================================================== loc a location code or a tuple of coordinates numpoints the number of points in the legend line prop the font property @@ -134,17 +133,16 @@ fancybox if True, draw a frame with a round fancybox. If None, use rc shadow if True, draw a shadow behind legend scatteryoffsets a list of yoffsets for scatter symbols in legend - borderpad the fractional whitespace inside the legend border labelspacing the vertical space between the legend entries handlelength the length of the legend handles handletextpad the pad between the legend handle and text borderaxespad the pad between the axes and legend border columnspacing the spacing between columns + ================ ================================================================== The dimensions of pad and spacing are given as a fraction of the fontsize. Values from rcParams will be used if None. - """ from matplotlib.axes import Axes # local import only to avoid circularity from matplotlib.figure import Figure # local import only to avoid circularity Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-08 21:27:40 UTC (rev 6521) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-08 21:54:22 UTC (rev 6522) @@ -1426,11 +1426,16 @@ args = [(argname, argdefault) \ for argname, argdefault in zip(args[1:], defaults)] else: - args = [] + args = None - _table.append([cls.__name__, name, - ",".join([("%s=%s" % (an, av)) for an, av in args])]) + if args is None: + argstr = 'None' # empy table entry crashed latex build + else: + argstr = ",".join([("%s=%s" % (an, av)) for an, av in args]) + _table.append([cls.__name__, name, argstr]) + + return _pprint_table(_table) @@ -2015,8 +2020,8 @@ comma-separated attributes. Alternatively, the attrs can be provided as keywords:: - set_boxstyle("round,pad=0.2") - set_boxstyle("round", pad=0.2) + set_boxstyle("round,pad=0.2") + set_boxstyle("round", pad=0.2) Old attrs simply are forgotten. @@ -2024,6 +2029,7 @@ available box styles. ACCEPTS: [ %(AvailableBoxstyles)s ] + """ if boxstyle==None: @@ -2793,6 +2799,7 @@ _style_list["-"] = Curve + class CurveA(_Curve): """ An arrow with a head at its begin point. @@ -2813,7 +2820,6 @@ _style_list["<-"] = CurveA - class CurveB(_Curve): """ An arrow with a head at its end point. @@ -2832,6 +2838,7 @@ beginarrow=False, endarrow=True, head_length=head_length, head_width=head_width ) + #_style_list["->"] = CurveB _style_list["->"] = CurveB @@ -2853,6 +2860,7 @@ beginarrow=True, endarrow=True, head_length=head_length, head_width=head_width ) + #_style_list["<->"] = CurveAB _style_list["<->"] = CurveAB @@ -2960,6 +2968,7 @@ super(ArrowStyle.BracketB, self).__init__(None, True, widthB=widthB, lengthB=lengthB, angleB=None ) + #_style_list["-["] = BracketB _style_list["-["] = BracketB Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-12-08 21:27:40 UTC (rev 6521) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-12-08 21:54:22 UTC (rev 6522) @@ -1297,9 +1297,9 @@ drawn. Valid keys for YAArow are - ========= =========================================================== + ========= ============================================================= Key Description - ========= =========================================================== + ========= ============================================================= width the width of the arrow in points frac the fraction of the arrow length occupied by the head headwidth the width of the base of the arrow head in points @@ -1310,7 +1310,7 @@ and base are shink percent of the distance *d* away from the endpoints. ie, ``shrink=0.05 is 5%%`` ? any key for :class:`matplotlib.patches.polygon` - ========= =========================================================== + ========= ============================================================= Valid keys for FancyArrowPatch are @@ -1319,8 +1319,8 @@ =============== ====================================================== Key Description =============== ====================================================== - arrowstyle - connectionstyle + arrowstyle the arrow style + connectionstyle the connection style relpos default is (0.5, 0.5) patchA default is bounding box of the text patchB default is None @@ -1328,8 +1328,8 @@ shrinkB default is 2 points mutation_scale default is text size (in points) mutation_aspect default is 1. - ? any key for :class:`matplotlib.patches.PathPatch` - ========= =========================================================== + ? any key for :class:`matplotlib.patches.PathPatch` + =============== ====================================================== *xycoords* and *textcoords* are strings that indicate the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2008-12-11 18:59:04
|
Revision: 6564 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6564&view=rev Author: leejjoon Date: 2008-12-11 18:59:00 +0000 (Thu, 11 Dec 2008) Log Message: ----------- deleted some unused imports, functions. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axis.py trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/lib/matplotlib/legend.py trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/lib/matplotlib/axis.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axis.py 2008-12-11 18:29:30 UTC (rev 6563) +++ trunk/matplotlib/lib/matplotlib/axis.py 2008-12-11 18:59:00 UTC (rev 6564) @@ -470,7 +470,7 @@ 'return the Interval instance for this axis view limits' return self.axes.viewLim.intervaly - def set_view_interval(self, vmin, vmax): + def set_view_interval(self, vmin, vmax, ignore = False): if ignore: self.axes.viewLim.intervaly = vmin, vmax else: Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 18:29:30 UTC (rev 6563) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 18:59:00 UTC (rev 6564) @@ -28,8 +28,6 @@ import numpy as np import matplotlib.cbook as cbook import matplotlib.colors as colors -import matplotlib._image as _image -import matplotlib.path as path import matplotlib.transforms as transforms import matplotlib.widgets as widgets from matplotlib import rcParams Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-12-11 18:29:30 UTC (rev 6563) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-12-11 18:59:00 UTC (rev 6564) @@ -21,23 +21,19 @@ * integrate screen dpi w/ ppi and text """ from __future__ import division -import os, sys, weakref import numpy as npy -import matplotlib from matplotlib import verbose, rcParams -from matplotlib._image import fromarray -from matplotlib._pylab_helpers import Gcf from matplotlib.backend_bases import RendererBase,\ - GraphicsContextBase, FigureManagerBase, FigureCanvasBase -from matplotlib.cbook import is_string_like, exception_to_str, maxdict + FigureManagerBase, FigureCanvasBase +from matplotlib.cbook import is_string_like, maxdict from matplotlib.figure import Figure from matplotlib.font_manager import findfont from matplotlib.ft2font import FT2Font, LOAD_FORCE_AUTOHINT from matplotlib.mathtext import MathTextParser from matplotlib.path import Path -from matplotlib.transforms import Affine2D, Bbox +from matplotlib.transforms import Bbox from _backend_agg import RendererAgg as _RendererAgg from matplotlib import _png Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2008-12-11 18:29:30 UTC (rev 6563) +++ trunk/matplotlib/lib/matplotlib/legend.py 2008-12-11 18:59:00 UTC (rev 6564) @@ -30,14 +30,10 @@ from matplotlib.cbook import is_string_like, iterable, silent_list, safezip from matplotlib.font_manager import FontProperties from matplotlib.lines import Line2D -from matplotlib.mlab import segments_intersect -from matplotlib.patches import Patch, Rectangle, Shadow, bbox_artist, FancyBboxPatch +from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch from matplotlib.collections import LineCollection, RegularPolyCollection -from matplotlib.text import Text -from matplotlib.transforms import Affine2D, Bbox, BboxTransformTo +from matplotlib.transforms import Bbox -from itertools import cycle, izip - from matplotlib.offsetbox import HPacker, VPacker, TextArea, DrawingArea Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-11 18:29:30 UTC (rev 6563) +++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-11 18:59:00 UTC (rev 6564) @@ -9,7 +9,6 @@ import matplotlib.artist as artist import matplotlib.colors as colors import matplotlib.transforms as transforms -import matplotlib.artist as artist from matplotlib.path import Path # these are not available for the object inspector until after the @@ -2171,7 +2170,7 @@ from matplotlib.bezier import split_bezier_intersecting_with_closedpath from matplotlib.bezier import get_intersection, inside_circle, get_parallels from matplotlib.bezier import make_wedged_bezier2 -from matplotlib.bezier import split_path_inout, inside_circle, get_cos_sin +from matplotlib.bezier import split_path_inout, get_cos_sin class ConnectionStyle(_Style): @@ -2651,7 +2650,7 @@ # call transmute method with squeezed height. path_mutated, closed = self.transmute(path_shrinked, linewidth, mutation_size) - vertices, codes = path_mutate.vertices, path_mutate.codes + vertices, codes = path_mutated.vertices, path_mutated.codes # Restore the height vertices[:,1] = vertices[:,1] * aspect_ratio return Path(vertices, codes), closed @@ -2915,8 +2914,6 @@ else: scaleB = self.scaleB - from matplotlib.bezier import get_cos_sin - vertices_list, codes_list = [], [] if self.bracketA: @@ -3297,12 +3294,6 @@ __init__.__doc__ = cbook.dedent(__init__.__doc__) % kwdoc del kwdoc - def list_available_arrowstyles(cls): - return _list_available_arrowstyles(cls._fancy_arrow_transmuters) - - def list_available_connectionstyles(cls): - return _list_available_connectionstyles(cls._connectors) - def set_positions(self, posA, posB): """ set the begin end end positions of the connecting path. Use current vlaue if None. Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2008-12-11 18:29:30 UTC (rev 6563) +++ trunk/matplotlib/lib/matplotlib/text.py 2008-12-11 18:59:00 UTC (rev 6564) @@ -575,10 +575,6 @@ return self._horizontalalignment - def _get_xy_display(self): - 'get the (possibly unit converted) transformed x,y in display coords' - return self.get_transform().transform_point((self._x, self._y)) - def get_position(self): "Return the position of the text as a tuple (*x*, *y*)" x = float(self.convert_xunits(self._x)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-01-16 18:45:29
|
Revision: 6793 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6793&view=rev Author: mdboom Date: 2009-01-16 18:45:18 +0000 (Fri, 16 Jan 2009) Log Message: ----------- Use "real" decorators, now that we don't support Python 2.3 Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py trunk/matplotlib/lib/matplotlib/backends/backend_wx.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/path.py trunk/matplotlib/lib/matplotlib/transforms.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2009-01-16 18:24:19 UTC (rev 6792) +++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py 2009-01-16 18:45:18 UTC (rev 6793) @@ -121,7 +121,7 @@ ctx.stroke() - #@staticmethod + @staticmethod def convert_path(ctx, tpath): for points, code in tpath.iter_segments(): if code == Path.MOVETO: @@ -136,7 +136,6 @@ ctx.curve_to(*points) elif code == Path.CLOSEPOLY: ctx.close_path() - convert_path = staticmethod(convert_path) def draw_path(self, gc, path, transform, rgbFace=None): Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-01-16 18:24:19 UTC (rev 6792) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-01-16 18:45:18 UTC (rev 6793) @@ -349,7 +349,10 @@ if self._need_redraw: x, y, w, h = self.allocation self._pixmap_prepare (w, h) - self._render_figure(self._pixmap, w, h) + try: + self._render_figure(self._pixmap, w, h) + except: + pass self._need_redraw = False x, y, w, h = event.area Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2009-01-16 18:24:19 UTC (rev 6792) +++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2009-01-16 18:45:18 UTC (rev 6793) @@ -303,7 +303,7 @@ gfx_ctx.Clip(new_bounds[0], self.height - new_bounds[1] - new_bounds[3], new_bounds[2], new_bounds[3]) - #@staticmethod + @staticmethod def convert_path(gfx_ctx, tpath): wxpath = gfx_ctx.CreatePath() for points, code in tpath.iter_segments(): @@ -318,7 +318,6 @@ elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath - convert_path = staticmethod(convert_path) def draw_path(self, gc, path, transform, rgbFace=None): gc.select() Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2009-01-16 18:24:19 UTC (rev 6792) +++ trunk/matplotlib/lib/matplotlib/collections.py 2009-01-16 18:45:18 UTC (rev 6793) @@ -565,7 +565,7 @@ self._meshWidth, self._meshHeight, self._coordinates) return self._paths - #@staticmethod + @staticmethod def convert_mesh_to_paths(meshWidth, meshHeight, coordinates): """ Converts a given mesh into a sequence of @@ -590,7 +590,6 @@ ), axis=2) points = points.reshape((meshWidth * meshHeight, 5, 2)) return [Path(x) for x in points] - convert_mesh_to_paths = staticmethod(convert_mesh_to_paths) def get_datalim(self, transData): return self._bbox Modified: trunk/matplotlib/lib/matplotlib/path.py =================================================================== --- trunk/matplotlib/lib/matplotlib/path.py 2009-01-16 18:24:19 UTC (rev 6792) +++ trunk/matplotlib/lib/matplotlib/path.py 2009-01-16 18:45:18 UTC (rev 6793) @@ -117,7 +117,7 @@ self.codes = codes self.vertices = vertices - #@classmethod + @classmethod def make_compound_path(cls, *args): """ (staticmethod) Make a compound path from a list of Path @@ -139,7 +139,6 @@ i += length return cls(vertices, codes) - make_compound_path = classmethod(make_compound_path) def __repr__(self): return "Path(%s, %s)" % (self.vertices, self.codes) @@ -337,7 +336,7 @@ return convert_path_to_polygons(self, transform, width, height) _unit_rectangle = None - #@classmethod + @classmethod def unit_rectangle(cls): """ (staticmethod) Returns a :class:`Path` of the unit rectangle @@ -347,10 +346,10 @@ cls._unit_rectangle = \ cls([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]]) return cls._unit_rectangle - unit_rectangle = classmethod(unit_rectangle) _unit_regular_polygons = WeakValueDictionary() - #@classmethod + + @classmethod def unit_regular_polygon(cls, numVertices): """ (staticmethod) Returns a :class:`Path` for a unit regular @@ -371,10 +370,10 @@ path = cls(verts) cls._unit_regular_polygons[numVertices] = path return path - unit_regular_polygon = classmethod(unit_regular_polygon) _unit_regular_stars = WeakValueDictionary() - #@classmethod + + @classmethod def unit_regular_star(cls, numVertices, innerCircle=0.5): """ (staticmethod) Returns a :class:`Path` for a unit regular star @@ -397,9 +396,8 @@ path = cls(verts) cls._unit_regular_polygons[(numVertices, innerCircle)] = path return path - unit_regular_star = classmethod(unit_regular_star) - #@classmethod + @classmethod def unit_regular_asterisk(cls, numVertices): """ (staticmethod) Returns a :class:`Path` for a unit regular @@ -407,10 +405,10 @@ centered at (0, 0). """ return cls.unit_regular_star(numVertices, 0.0) - unit_regular_asterisk = classmethod(unit_regular_asterisk) _unit_circle = None - #@classmethod + + @classmethod def unit_circle(cls): """ (staticmethod) Returns a :class:`Path` of the unit circle. @@ -470,9 +468,8 @@ cls._unit_circle = cls(vertices, codes) return cls._unit_circle - unit_circle = classmethod(unit_circle) - #@classmethod + @classmethod def arc(cls, theta1, theta2, n=None, is_wedge=False): """ (staticmethod) Returns an arc on the unit circle from angle @@ -549,9 +546,8 @@ vertices[vertex_offset+2:end:3, 1] = yB return cls(vertices, codes) - arc = classmethod(arc) - #@classmethod + @classmethod def wedge(cls, theta1, theta2, n=None): """ (staticmethod) Returns a wedge of the unit circle from angle @@ -562,10 +558,10 @@ determined based on the delta between *theta1* and *theta2*. """ return cls.arc(theta1, theta2, n, True) - wedge = classmethod(wedge) _hatch_dict = maxdict(8) - #@classmethod + + @classmethod def hatch(cls, hatchpattern, density=6): """ Given a hatch specifier, *hatchpattern*, generates a Path that @@ -584,7 +580,6 @@ hatch_path = get_path(hatchpattern, density) cls._hatch_dict[(hatchpattern, density)] = hatch_path return hatch_path - hatch = classmethod(hatch) _get_path_collection_extents = get_path_collection_extents def get_path_collection_extents(*args): Modified: trunk/matplotlib/lib/matplotlib/transforms.py =================================================================== --- trunk/matplotlib/lib/matplotlib/transforms.py 2009-01-16 18:24:19 UTC (rev 6792) +++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-01-16 18:45:18 UTC (rev 6793) @@ -667,7 +667,7 @@ bbox.update_from_data_xy(corners_rotated, ignore=True) return bbox - #@staticmethod + @staticmethod def union(bboxes): """ Return a :class:`Bbox` that contains all of the given bboxes. @@ -692,7 +692,6 @@ y1 = max(y1, np.max(ys)) return Bbox.from_extents(x0, y0, x1, y1) - union = staticmethod(union) class Bbox(BboxBase): @@ -724,16 +723,15 @@ TransformNode.invalidate(self) _unit_values = np.array([[0.0, 0.0], [1.0, 1.0]], np.float_) - #@staticmethod + @staticmethod def unit(): """ (staticmethod) Create a new unit :class:`Bbox` from (0, 0) to (1, 1). """ return Bbox(Bbox._unit_values.copy()) - unit = staticmethod(unit) - #@staticmethod + @staticmethod def from_bounds(x0, y0, width, height): """ (staticmethod) Create a new :class:`Bbox` from *x0*, *y0*, @@ -742,9 +740,8 @@ *width* and *height* may be negative. """ return Bbox.from_extents(x0, y0, x0 + width, y0 + height) - from_bounds = staticmethod(from_bounds) - #@staticmethod + @staticmethod def from_extents(*args): """ (staticmethod) Create a new Bbox from *left*, *bottom*, @@ -754,7 +751,6 @@ """ points = np.array(args, dtype=np.float_).reshape(2, 2) return Bbox(points) - from_extents = staticmethod(from_extents) def __repr__(self): return 'Bbox(%s)' % repr(self._points) @@ -1311,14 +1307,13 @@ def __array__(self, *args, **kwargs): return self.get_matrix() - #@staticmethod + @staticmethod def _concat(a, b): """ Concatenates two transformation matrices (represented as numpy arrays) together. """ return np.dot(b, a) - _concat = staticmethod(_concat) def get_matrix(self): """ @@ -1387,7 +1382,7 @@ mtx = self.get_matrix() return tuple(mtx[:2].swapaxes(0, 1).flatten()) - #@staticmethod + @staticmethod def matrix_from_values(a, b, c, d, e, f): """ (staticmethod) Create a new transformation matrix as a 3x3 @@ -1398,7 +1393,6 @@ 0 0 1 """ return np.array([[a, c, e], [b, d, f], [0.0, 0.0, 1.0]], np.float_) - matrix_from_values = staticmethod(matrix_from_values) def transform(self, points): mtx = self.get_matrix() @@ -1473,7 +1467,7 @@ return 0 return -1 - #@staticmethod + @staticmethod def from_values(a, b, c, d, e, f): """ (staticmethod) Create a new Affine2D instance from the given @@ -1486,7 +1480,6 @@ return Affine2D( np.array([a, c, e, b, d, f, 0.0, 0.0, 1.0], np.float_) .reshape((3,3))) - from_values = staticmethod(from_values) def get_matrix(self): """ @@ -1519,7 +1512,7 @@ self._mtx = other.get_matrix() self.invalidate() - #@staticmethod + @staticmethod def identity(): """ (staticmethod) Return a new :class:`Affine2D` object that is @@ -1529,7 +1522,6 @@ the faster :class:`IdentityTransform` class instead. """ return Affine2D(np.identity(3)) - identity = staticmethod(identity) def clear(self): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ry...@us...> - 2009-01-16 20:30:36
|
Revision: 6799 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6799&view=rev Author: ryanmay Date: 2009-01-16 20:30:29 +0000 (Fri, 16 Jan 2009) Log Message: ----------- Use staticmethod as a decorator since we can assume Python 2.4 Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/dates.py trunk/matplotlib/lib/matplotlib/units.py Modified: trunk/matplotlib/lib/matplotlib/dates.py =================================================================== --- trunk/matplotlib/lib/matplotlib/dates.py 2009-01-16 20:26:39 UTC (rev 6798) +++ trunk/matplotlib/lib/matplotlib/dates.py 2009-01-16 20:30:29 UTC (rev 6799) @@ -1005,6 +1005,7 @@ class DateConverter(units.ConversionInterface): + @staticmethod def axisinfo(unit): 'return the unit AxisInfo' if unit=='date': @@ -1016,17 +1017,16 @@ label='', ) else: return None - axisinfo = staticmethod(axisinfo) + @staticmethod def convert(value, unit): if units.ConversionInterface.is_numlike(value): return value return date2num(value) - convert = staticmethod(convert) + @staticmethod def default_units(x): 'Return the default unit for *x* or None' return 'date' - default_units = staticmethod(default_units) units.registry[datetime.date] = DateConverter() Modified: trunk/matplotlib/lib/matplotlib/units.py =================================================================== --- trunk/matplotlib/lib/matplotlib/units.py 2009-01-16 20:26:39 UTC (rev 6798) +++ trunk/matplotlib/lib/matplotlib/units.py 2009-01-16 20:30:29 UTC (rev 6799) @@ -18,11 +18,12 @@ class DateConverter(units.ConversionInterface): + @staticmethod def convert(value, unit): 'convert value to a scalar or array' return dates.date2num(value) - convert = staticmethod(convert) + @staticmethod def axisinfo(unit): 'return major and minor tick locators and formatters' if unit!='date': return None @@ -31,13 +32,11 @@ return AxisInfo(majloc=majloc, majfmt=majfmt, label='date') - axisinfo = staticmethod(axisinfo) - + @staticmethod def default_units(x): 'return the default unit for x or None' return 'date' - default_units = staticmethod(default_units) # finally we register our object type with a converter units.registry[datetime.date] = DateConverter() @@ -69,16 +68,17 @@ The minimal interface for a converter to take custom instances (or sequences) and convert them to values mpl can use """ + @staticmethod def axisinfo(unit): 'return an units.AxisInfo instance for unit' return None - axisinfo = staticmethod(axisinfo) + @staticmethod def default_units(x): 'return the default unit for x or None' return None - default_units = staticmethod(default_units) + @staticmethod def convert(obj, unit): """ convert obj using unit. If obj is a sequence, return the @@ -86,8 +86,8 @@ that can be used by the numpy array layer """ return obj - convert = staticmethod(convert) + @staticmethod def is_numlike(x): """ The matplotlib datalim, autoscaling, locators etc work with @@ -103,7 +103,6 @@ return is_numlike(thisx) else: return is_numlike(x) - is_numlike = staticmethod(is_numlike) class Registry(dict): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2009-01-28 17:55:10
|
Revision: 6844 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6844&view=rev Author: jrevans Date: 2009-01-28 17:55:07 +0000 (Wed, 28 Jan 2009) Log Message: ----------- Updated ConversionInterface to recieve the associated calling Axis instance for each of the methods. Updated appropriate calls in other code. Modified DateConverter to use units for timezone specification. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axis.py trunk/matplotlib/lib/matplotlib/dates.py trunk/matplotlib/lib/matplotlib/units.py Modified: trunk/matplotlib/lib/matplotlib/axis.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axis.py 2009-01-27 17:41:33 UTC (rev 6843) +++ trunk/matplotlib/lib/matplotlib/axis.py 2009-01-28 17:55:07 UTC (rev 6844) @@ -939,7 +939,7 @@ converter = munits.registry.get_converter(data) if converter is None: return False self.converter = converter - default = self.converter.default_units(data) + default = self.converter.default_units(self, data) #print 'update units: default="%s", units=%s"'%(default, self.units) if default is not None and self.units is None: self.set_units(default) @@ -955,7 +955,7 @@ if self.converter is None: return - info = self.converter.axisinfo(self.units) + info = self.converter.axisinfo(self, self.units) if info is None: return if info.majloc is not None and self.major.locator!=info.majloc: @@ -982,7 +982,7 @@ #print 'convert_units returning identity: units=%s, converter=%s'%(self.units, self.converter) return x - ret = self.converter.convert(x, self.units) + ret = self.converter.convert(self, x, self.units) #print 'convert_units converting: axis=%s, units=%s, converter=%s, in=%s, out=%s'%(self, self.units, self.converter, x, ret) return ret Modified: trunk/matplotlib/lib/matplotlib/dates.py =================================================================== --- trunk/matplotlib/lib/matplotlib/dates.py 2009-01-27 17:41:33 UTC (rev 6843) +++ trunk/matplotlib/lib/matplotlib/dates.py 2009-01-28 17:55:07 UTC (rev 6844) @@ -1004,29 +1004,56 @@ class DateConverter(units.ConversionInterface): + """The units are equivalent to the timezone.""" @staticmethod - def axisinfo(unit): + def axisinfo(axis, unit): 'return the unit AxisInfo' - if unit=='date': - majloc = AutoDateLocator() - majfmt = AutoDateFormatter(majloc) - return units.AxisInfo( - majloc = majloc, - majfmt = majfmt, - label='', - ) - else: return None + # make sure that the axis does not start at 0 + ax = axis.axes + if axis is ax.get_xaxis(): + xmin, xmax = ax.dataLim.intervalx + if xmin==0.: + # no data has been added - let's set the default datalim. + # We should probably use a better proxy for the datalim + # have been updated than the ignore setting + dmax = today = datetime.date.today() + dmin = today-datetime.timedelta(days=10) + + ax._process_unit_info(xdata=(dmin, dmax)) + dmin, dmax = ax.convert_xunits([dmin, dmax]) + + ax.viewLim.intervalx = dmin, dmax + ax.dataLim.intervalx = dmin, dmax + elif axis is ax.get_yaxis(): + ymin, ymax = ax.dataLim.intervaly + if ymin==0.: + # no data has been added - let's set the default datalim. + # We should probably use a better proxy for the datalim + # have been updated than the ignore setting + dmax = today = datetime.date.today() + dmin = today-datetime.timedelta(days=10) + + ax._process_unit_info(ydata=(dmin, dmax)) + dmin, dmax = ax.convert_yunits([dmin, dmax]) + + ax.viewLim.intervaly = dmin, dmax + ax.dataLim.intervaly = dmin, dmax + + majloc = AutoDateLocator(tz=unit) + majfmt = AutoDateFormatter(majloc, tz=unit) + return units.AxisInfo( majloc=majloc, majfmt=majfmt, label='' ) + @staticmethod - def convert(value, unit): + def convert(axis, value, unit): if units.ConversionInterface.is_numlike(value): return value return date2num(value) @staticmethod - def default_units(x): + def default_units(axis, x): 'Return the default unit for *x* or None' - return 'date' + return None units.registry[datetime.date] = DateConverter() Modified: trunk/matplotlib/lib/matplotlib/units.py =================================================================== --- trunk/matplotlib/lib/matplotlib/units.py 2009-01-27 17:41:33 UTC (rev 6843) +++ trunk/matplotlib/lib/matplotlib/units.py 2009-01-28 17:55:07 UTC (rev 6844) @@ -69,20 +69,20 @@ sequences) and convert them to values mpl can use """ @staticmethod - def axisinfo(unit): - 'return an units.AxisInfo instance for unit' + def axisinfo(axis, unit): + 'return an units.AxisInfo instance for axis with the specified units' return None @staticmethod - def default_units(x): - 'return the default unit for x or None' + def default_units(axis, x): + 'return the default unit for x or None for the given axis' return None @staticmethod - def convert(obj, unit): + def convert(axis, obj, unit): """ - convert obj using unit. If obj is a sequence, return the - converted sequence. The ouput must be a sequence of scalars + convert obj using unit for the specified axis. If obj is a sequence, + return the converted sequence. The ouput must be a sequence of scalars that can be used by the numpy array layer """ return obj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jr...@us...> - 2009-02-03 17:25:52
|
Revision: 6870 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6870&view=rev Author: jrevans Date: 2009-02-03 17:25:49 +0000 (Tue, 03 Feb 2009) Log Message: ----------- User specified tickers and labels for any given axis will now take precedence over "default" values. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/axis.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-02-03 13:59:00 UTC (rev 6869) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-02-03 17:25:49 UTC (rev 6870) @@ -2672,12 +2672,7 @@ :meth:`text` for information on how override and the optional args work """ - - label = self.xaxis.get_label() - label.set_text(xlabel) - if fontdict is not None: label.update(fontdict) - label.update(kwargs) - return label + return self.xaxis.set_label_text(xlabel, fontdict, **kwargs) set_xlabel.__doc__ = cbook.dedent(set_xlabel.__doc__) % martist.kwdocd def get_ylabel(self): @@ -2704,11 +2699,7 @@ :meth:`text` for information on how override and the optional args work """ - label = self.yaxis.get_label() - label.set_text(ylabel) - if fontdict is not None: label.update(fontdict) - label.update(kwargs) - return label + return self.yaxis.set_label_text(ylabel, fontdict, **kwargs) set_ylabel.__doc__ = cbook.dedent(set_ylabel.__doc__) % martist.kwdocd def text(self, x, y, s, fontdict=None, Modified: trunk/matplotlib/lib/matplotlib/axis.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axis.py 2009-02-03 13:59:00 UTC (rev 6869) +++ trunk/matplotlib/lib/matplotlib/axis.py 2009-02-03 17:25:49 UTC (rev 6870) @@ -514,6 +514,15 @@ artist.Artist.__init__(self) self.set_figure(axes.figure) + # Keep track of setting to the default value, this allows use to know + # if any of the following values is explicitly set by the user, so as + # to not overwrite their settings with any of our 'auto' settings. + self.isDefault_majloc = True + self.isDefault_minloc = True + self.isDefault_majfmt = True + self.isDefault_minfmt = True + self.isDefault_label = True + self.axes = axes self.major = Ticker() self.minor = Ticker() @@ -568,6 +577,11 @@ self._scale = mscale.scale_factory(value, self, **kwargs) self._scale.set_default_locators_and_formatters(self) + self.isDefault_majloc = True + self.isDefault_minloc = True + self.isDefault_majfmt = True + self.isDefault_minfmt = True + def limit_range_for_scale(self, vmin, vmax): return self._scale.limit_range_for_scale(vmin, vmax, self.get_minpos()) @@ -587,6 +601,18 @@ self.set_minor_locator(mticker.NullLocator()) self.set_minor_formatter(mticker.NullFormatter()) + self.set_label_text('') + self._set_artist_props(self.label) + + # Keep track of setting to the default value, this allows use to know + # if any of the following values is explicitly set by the user, so as + # to not overwrite their settings with any of our 'auto' settings. + self.isDefault_majloc = True + self.isDefault_minloc = True + self.isDefault_majfmt = True + self.isDefault_minfmt = True + self.isDefault_label = True + # Clear the callback registry for this axis, or it may "leak" self.callbacks = cbook.CallbackRegistry(('units', 'units finalize')) @@ -836,6 +862,10 @@ dest.label1On = src.label1On dest.label2On = src.label2On + def get_label_text(self): + 'Get the text of the label' + return self.label.get_text() + def get_major_locator(self): 'Get the locator of the major ticker' return self.major.locator @@ -958,17 +988,21 @@ info = self.converter.axisinfo(self.units, self) if info is None: return - if info.majloc is not None and self.major.locator!=info.majloc: + if info.majloc is not None and self.major.locator!=info.majloc and self.isDefault_majloc: self.set_major_locator(info.majloc) - if info.minloc is not None and self.minor.locator!=info.minloc: + self.isDefault_majloc = True + if info.minloc is not None and self.minor.locator!=info.minloc and self.isDefault_minloc: self.set_minor_locator(info.minloc) - if info.majfmt is not None and self.major.formatter!=info.majfmt: + self.isDefault_minloc = True + if info.majfmt is not None and self.major.formatter!=info.majfmt and self.isDefault_majfmt: self.set_major_formatter(info.majfmt) - if info.minfmt is not None and self.minor.formatter!=info.minfmt: + self.isDefault_majfmt = True + if info.minfmt is not None and self.minor.formatter!=info.minfmt and self.isDefault_minfmt: self.set_minor_formatter(info.minfmt) - if info.label is not None: - label = self.get_label() - label.set_text(info.label) + self.isDefault_minfmt = True + if info.label is not None and self.isDefault_label: + self.set_label_text(info.label) + self.isDefault_label = True def have_units(self): @@ -1010,12 +1044,24 @@ 'return the units for axis' return self.units + def set_label_text(self, label, fontdict = None, **kwargs): + """ Sets the text value of the axis label + + ACCEPTS: A string value for the label + """ + self.isDefault_label = False + self.label.set_text(label) + if fontdict is not None: self.label.update(fontdict) + self.label.update(kwargs) + return self.label + def set_major_formatter(self, formatter): """ Set the formatter of the major ticker ACCEPTS: A :class:`~matplotlib.ticker.Formatter` instance """ + self.isDefault_majfmt = False self.major.formatter = formatter formatter.set_axis(self) @@ -1026,6 +1072,7 @@ ACCEPTS: A :class:`~matplotlib.ticker.Formatter` instance """ + self.isDefault_minfmt = False self.minor.formatter = formatter formatter.set_axis(self) @@ -1036,6 +1083,7 @@ ACCEPTS: a :class:`~matplotlib.ticker.Locator` instance """ + self.isDefault_majloc = False self.major.locator = locator locator.set_axis(self) @@ -1046,6 +1094,7 @@ ACCEPTS: a :class:`~matplotlib.ticker.Locator` instance """ + self.isDefault_minloc = False self.minor.locator = locator locator.set_axis(self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-06-06 13:26:51
|
Revision: 7185 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7185&view=rev Author: jdh2358 Date: 2009-06-06 13:26:49 +0000 (Sat, 06 Jun 2009) Log Message: ----------- added Neil's auto minor tick patch; sf patch #2789713 Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/pyplot.py trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-06-06 11:36:10 UTC (rev 7184) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-06-06 13:26:49 UTC (rev 7185) @@ -7790,7 +7790,19 @@ return _bbox + def minorticks_on(self): + 'Add autoscaling minor ticks to the axes.' + for ax in (self.xaxis, self.yaxis): + if ax.get_scale() == 'log': + s = ax._scale + ax.set_minor_locator(mticker.LogLocator(s.base, s.subs)) + else: + ax.set_minor_locator(mticker.AutoMinorLocator()) + def minorticks_off(self): + 'Remove minor ticks from the axes.' + self.xaxis.set_minor_locator(mticker.NullLocator()) + self.yaxis.set_minor_locator(mticker.NullLocator()) class SubplotBase: Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-06-06 11:36:10 UTC (rev 7184) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-06-06 13:26:49 UTC (rev 7185) @@ -1047,8 +1047,23 @@ silent_list('Text yticklabel', labels) ) +def minorticks_on(): + """ + Display minor ticks on the current plot. + Displaying minor ticks reduces performance; turn them off using + minorticks_off() if drawing speed is a problem. + """ + gca().minorticks_on() + draw_if_interactive() +def minorticks_off(): + """ + Remove minor ticks from the current plot. + """ + gca().minorticks_off() + draw_if_interactive() + def rgrids(*args, **kwargs): """ Set/Get the radial locations of the gridlines and ticklabels on a Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2009-06-06 11:36:10 UTC (rev 7184) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2009-06-06 13:26:49 UTC (rev 7185) @@ -1182,6 +1182,40 @@ def __init__(self): MaxNLocator.__init__(self, nbins=9, steps=[1, 2, 5, 10]) +class AutoMinorLocator(Locator): + """ + Dynamically find minor tick positions based on the positions of + major ticks. Assumes the scale is linear and major ticks are + evenly spaced. + """ + def __call__(self): + 'Return the locations of the ticks' + majorlocs = self.axis.get_majorticklocs() + try: + majorstep = majorlocs[1] - majorlocs[0] + except IndexError: + raise ValueError('Need at least two major ticks to find minor ' + 'tick locations') + # see whether major step should be divided by 5, 4 or 2. This + # should cover most cases. + temp = float(('%e' % majorstep).split('e')[0]) + if temp % 5 < 1e-10: + minorstep = majorstep / 5. + elif temp % 2 < 1e-10: + minorstep = majorstep / 4. + else: + minorstep = majorstep / 2. + + tmin = majorlocs[0] - majorstep + tmax = majorlocs[-1] + majorstep + locs = np.arange(tmin, tmax, minorstep) + vmin, vmax = self.axis.get_view_interval() + if vmin > vmax: + vmin,vmax = vmax,vmin + + return locs[(vmin < locs) & (locs < vmax)] + + class OldAutoLocator(Locator): """ On autoscale this class picks the best MultipleLocator to set the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2009-06-06 18:21:52
|
Revision: 7188 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7188&view=rev Author: efiring Date: 2009-06-06 18:21:51 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Try to improve the cursor readout and status message. This could be done better with changes to the backends. The status (pan/zoom etc) should be indicated via the state of the buttons, e.g. using radio buttons, rather than by printing text. The readout should be positioned to minimize jumping around of the text. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-06-06 18:18:54 UTC (rev 7187) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-06-06 18:21:51 UTC (rev 7188) @@ -2468,12 +2468,14 @@ def format_coord(self, x, y): 'return a format string formatting the *x*, *y* coord' if x is None: - x = '???' + xs = '???' + else: + xs = self.format_xdata(x) if y is None: - y = '???' - xs = self.format_xdata(x) - ys = self.format_ydata(y) - return 'x=%s, y=%s'%(xs,ys) + ys = '???' + else: + ys = self.format_ydata(y) + return 'x=%s y=%s'%(xs,ys) #### Interactive manipulation Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2009-06-06 18:18:54 UTC (rev 7187) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2009-06-06 18:21:51 UTC (rev 7188) @@ -1460,7 +1460,7 @@ restore_bbox = tight_bbox.adjust_bbox(self.figure, format, bbox_inches) - + _bbox_inches_restore = (bbox_inches, restore_bbox) else: _bbox_inches_restore = None @@ -1896,7 +1896,7 @@ except OverflowError: pass else: if len(self.mode): - self.set_message('%s : %s' % (self.mode, s)) + self.set_message('%s, %s' % (self.mode, s)) else: self.set_message(s) else: self.set_message(self.mode) @@ -1923,7 +1923,7 @@ 'button_press_event', self.press_pan) self._idRelease = self.canvas.mpl_connect( 'button_release_event', self.release_pan) - self.mode = 'pan/zoom mode' + self.mode = 'pan/zoom' self.canvas.widgetlock(self) else: self.canvas.widgetlock.release(self) @@ -2193,7 +2193,7 @@ if self._active: self._idPress = self.canvas.mpl_connect('button_press_event', self.press_zoom) self._idRelease = self.canvas.mpl_connect('button_release_event', self.release_zoom) - self.mode = 'Zoom to rect mode' + self.mode = 'zoom rect' self.canvas.widgetlock(self) else: self.canvas.widgetlock.release(self) Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2009-06-06 18:18:54 UTC (rev 7187) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2009-06-06 18:21:51 UTC (rev 7188) @@ -344,7 +344,7 @@ def format_data_short(self,value): 'return a short formatted string representation of a number' - return '%1.3g'%value + return '%-12g'%value def format_data(self,value): 'return a formatted string representation of a number' @@ -525,7 +525,7 @@ def format_data_short(self,value): 'return a short formatted string representation of a number' - return '%1.3g'%value + return '%-12g'%value def is_decade(self, x): n = self.nearest_long(x) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2009-06-25 04:57:50
|
Revision: 7240 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7240&view=rev Author: leejjoon Date: 2009-06-25 04:57:48 +0000 (Thu, 25 Jun 2009) Log Message: ----------- legend supports CircleCollection. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/legend.py Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2009-06-24 21:01:53 UTC (rev 7239) +++ trunk/matplotlib/lib/matplotlib/collections.py 2009-06-25 04:57:48 UTC (rev 7240) @@ -995,6 +995,10 @@ self._paths = [mpath.Path.unit_circle()] __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd + def get_sizes(self): + "return sizes of circles" + return self._sizes + def draw(self, renderer): # sizes is the area of the circle circumscribing the polygon # in points^2 Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2009-06-24 21:01:53 UTC (rev 7239) +++ trunk/matplotlib/lib/matplotlib/legend.py 2009-06-25 04:57:48 UTC (rev 7240) @@ -31,7 +31,8 @@ from matplotlib.font_manager import FontProperties from matplotlib.lines import Line2D from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch -from matplotlib.collections import LineCollection, RegularPolyCollection +from matplotlib.collections import LineCollection, RegularPolyCollection, \ + CircleCollection from matplotlib.transforms import Bbox, BboxBase, TransformedBbox, BboxTransformTo from matplotlib.offsetbox import HPacker, VPacker, TextArea, DrawingArea @@ -439,7 +440,8 @@ # manually set their transform to the self.get_transform(). for handle in handles: - if isinstance(handle, RegularPolyCollection): + if isinstance(handle, RegularPolyCollection) or \ + isinstance(handle, CircleCollection): npoints = self.scatterpoints else: npoints = self.numpoints @@ -531,6 +533,31 @@ p.set_clip_path(None) handle_list.append(p) + elif isinstance(handle, CircleCollection): + + ydata = height*self._scatteryoffsets + + size_max, size_min = max(handle.get_sizes()),\ + min(handle.get_sizes()) + # we may need to scale these sizes by "markerscale" + # attribute. But other handle types does not seem + # to care about this attribute and it is currently ignored. + if self.scatterpoints < 4: + sizes = [.5*(size_max+size_min), size_max, + size_min] + else: + sizes = (size_max-size_min)*np.linspace(0,1,self.scatterpoints)+size_min + + p = type(handle)(sizes, + offsets=zip(xdata_marker,ydata), + transOffset=self.get_transform(), + ) + + p.update_from(handle) + p.set_figure(self.figure) + p.set_clip_box(None) + p.set_clip_path(None) + handle_list.append(p) else: handle_list.append(None) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-07-12 03:20:56
|
Revision: 7258 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7258&view=rev Author: jdh2358 Date: 2009-07-12 03:20:53 +0000 (Sun, 12 Jul 2009) Log Message: ----------- use png icon on gtk for win32 Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py trunk/matplotlib/lib/matplotlib/lines.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-07-11 20:18:06 UTC (rev 7257) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-07-12 03:20:53 UTC (rev 7258) @@ -1148,7 +1148,7 @@ # versions of pygtk, so we have to use a PNG file instead. try: - if gtk.pygtk_version < (2, 8, 0): + if gtk.pygtk_version < (2, 8, 0) or sys.platform == 'win32': icon_filename = 'matplotlib.png' else: icon_filename = 'matplotlib.svg' Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2009-07-11 20:18:06 UTC (rev 7257) +++ trunk/matplotlib/lib/matplotlib/lines.py 2009-07-12 03:20:53 UTC (rev 7258) @@ -335,10 +335,10 @@ def set_fillstyle(self, fs): """ - Set the marker fill style; full means fill the whole marker. - The other options are for half fills + Set the marker fill style; 'full' means fill the whole marker. + The other options are for half filled markers - ACCEPTS: string ['full' | 'left' | 'right' | 'bottom' | 'top'] + ACCEPTS: ['full' | 'left' | 'right' | 'bottom' | 'top'] """ assert fs in ['full', 'left' , 'right' , 'bottom' , 'top'] self._fillstyle = fs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2009-07-30 17:08:37
|
Revision: 7308 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7308&view=rev Author: leejjoon Date: 2009-07-30 17:08:23 +0000 (Thu, 30 Jul 2009) Log Message: ----------- legend doc. update Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/legend.py trunk/matplotlib/lib/matplotlib/offsetbox.py trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-07-29 21:28:50 UTC (rev 7307) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-07-30 17:08:23 UTC (rev 7308) @@ -3906,31 +3906,66 @@ 'center' 10 =============== ============= - If none of these are locations are suitable, loc can be a 2-tuple - giving x,y in axes coords, ie:: - loc = 0, 1 # left top - loc = 0.5, 0.5 # center + Users can specify any arbitrary location for the legend using the + *bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance + of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. + For example, + + loc = 'upper right', bbox_to_anchor = (0.5, 0.5) + will place the legend so that the upper right corner of the legend at + the center of the axes. + + The legend location can be specified in other coordinate, by using the + *bbox_transform* keyword. + + The loc itslef can be a 2-tuple giving x,y of the lower-left corner of + the legend in axes coords (*bbox_to_anchor* is ignored). + + Keyword arguments: - *isaxes*: [ True | False ] - Indicates that this is an axes legend + *prop*: [ None | FontProperties | dict ] + A :class:`matplotlib.font_manager.FontProperties` + instance. If *prop* is a dictionary, a new instance will be + created with *prop*. If *None*, use rc settings. *numpoints*: integer - The number of points in the legend line, default is 4 + The number of points in the legend for line - *prop*: [ None | FontProperties ] - A :class:`matplotlib.font_manager.FontProperties` - instance, or *None* to use rc settings. + *scatterpoints*: integer + The number of points in the legend for scatter plot + *scatteroffsets*: list of floats + a list of yoffsets for scatter symbols in legend + *markerscale*: [ None | scalar ] The relative size of legend markers vs. original. If *None*, use rc settings. + *fancybox*: [ None | False | True ] + if True, draw a frame with a round fancybox. If None, use rc + *shadow*: [ None | False | True ] If *True*, draw a shadow behind legend. If *None*, use rc settings. + *ncol* : integer + number of columns. default is 1 + + *mode* : [ "expand" | None ] + if mode is "expand", the legend will be horizontally expanded + to fill the axes area (or *bbox_to_anchor*) + + *bbox_to_anchor* : an instance of BboxBase or a tuple of 2 or 4 floats + the bbox that the legend will be anchored. + + *bbox_transform* : [ an instance of Transform | None ] + the transform for the bbox. transAxes if None. + + *title* : string + the legend title + Padding and spacing between various elements use following keywords parameters. The dimensions of these values are given as a fraction of the fontsize. Values from rcParams will be used if None. @@ -3946,9 +3981,13 @@ columnspacing the spacing between columns ================ ================================================================== + **Example:** .. plot:: mpl_examples/api/legend_demo.py + + Also see :ref:`plotting-guide-legend`. + """ if len(args)==0: Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2009-07-29 21:28:50 UTC (rev 7307) +++ trunk/matplotlib/lib/matplotlib/figure.py 2009-07-30 17:08:23 UTC (rev 7308) @@ -829,29 +829,60 @@ (0,0) is the left, bottom of the figure and 1,1 is the right, top. - The legend instance is returned. The following kwargs are supported + Keyword arguments: - *loc* - the location of the legend - *numpoints* - the number of points in the legend line - *prop* - a :class:`matplotlib.font_manager.FontProperties` instance - *pad* - the fractional whitespace inside the legend border - *markerscale* - the relative size of legend markers vs. original - *shadow* - if True, draw a shadow behind legend - *labelsep* - the vertical space between the legend entries - *handlelen* - the length of the legend lines - *handletextsep* - the space between the legend line and legend text - *axespad* - the border between the axes and legend edge + *prop*: [ None | FontProperties | dict ] + A :class:`matplotlib.font_manager.FontProperties` + instance. If *prop* is a dictionary, a new instance will be + created with *prop*. If *None*, use rc settings. + *numpoints*: integer + The number of points in the legend line, default is 4 + + *scatterpoints*: integer + The number of points in the legend line, default is 4 + + *scatteroffsets*: list of floats + a list of yoffsets for scatter symbols in legend + + *markerscale*: [ None | scalar ] + The relative size of legend markers vs. original. If *None*, use rc + settings. + + *fancybox*: [ None | False | True ] + if True, draw a frame with a round fancybox. If None, use rc + + *shadow*: [ None | False | True ] + If *True*, draw a shadow behind legend. If *None*, use rc settings. + + *ncol* : integer + number of columns. default is 1 + + *mode* : [ "expand" | None ] + if mode is "expand", the legend will be horizontally expanded + to fill the axes area (or *bbox_to_anchor*) + + *title* : string + the legend title + + Padding and spacing between various elements use following keywords + parameters. The dimensions of these values are given as a fraction + of the fontsize. Values from rcParams will be used if None. + + ================ ================================================================== + Keyword Description + ================ ================================================================== + borderpad the fractional whitespace inside the legend border + labelspacing the vertical space between the legend entries + handlelength the length of the legend handles + handletextpad the pad between the legend handle and text + borderaxespad the pad between the axes and legend border + columnspacing the spacing between columns + ================ ================================================================== + + + **Example:** + .. plot:: mpl_examples/pylab_examples/figlegend_demo.py """ handles = flatten(handles) Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2009-07-29 21:28:50 UTC (rev 7307) +++ trunk/matplotlib/lib/matplotlib/legend.py 2009-07-30 17:08:23 UTC (rev 7308) @@ -126,13 +126,15 @@ ================ ================================================================== Keyword Description ================ ================================================================== - loc a location code or a tuple of coordinates - numpoints the number of points in the legend line + loc a location code prop the font property markerscale the relative size of legend markers vs. original + numpoints the number of points in the legend for line + scatterpoints the number of points in the legend for scatter plot + scatteryoffsets a list of yoffsets for scatter symbols in legend fancybox if True, draw a frame with a round fancybox. If None, use rc shadow if True, draw a shadow behind legend - scatteryoffsets a list of yoffsets for scatter symbols in legend + ncol number of columns borderpad the fractional whitespace inside the legend border labelspacing the vertical space between the legend entries handlelength the length of the legend handles @@ -147,9 +149,14 @@ The dimensions of pad and spacing are given as a fraction of the _fontsize. Values from rcParams will be used if None. -bbox_to_anchor can be an instance of BboxBase(or its derivatives) or a -tuple of 2 or 4 floats. See :meth:`set_bbox_to_anchor` for more -detail. +Users can specify any arbitrary location for the legend using the +*bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance +of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. +See :meth:`set_bbox_to_anchor` for more detail. + +The legend location can be specified by setting *loc* with a tuple of +2 floats, which is interpreted as the lower-left corner of the legend +in the normalized axes coordinate. """ from matplotlib.axes import Axes # local import only to avoid circularity from matplotlib.figure import Figure # local import only to avoid circularity @@ -158,8 +165,13 @@ if prop is None: self.prop=FontProperties(size=rcParams["legend.fontsize"]) + elif isinstance(prop, dict): + self.prop=FontProperties(**prop) + if "size" not in prop: + self.prop.set_size(rcParams["legend.fontsize"]) else: self.prop=prop + self._fontsize = self.prop.get_size_in_points() propnames=['numpoints', 'markerscale', 'shadow', "columnspacing", Modified: trunk/matplotlib/lib/matplotlib/offsetbox.py =================================================================== --- trunk/matplotlib/lib/matplotlib/offsetbox.py 2009-07-29 21:28:50 UTC (rev 7307) +++ trunk/matplotlib/lib/matplotlib/offsetbox.py 2009-07-30 17:08:23 UTC (rev 7308) @@ -833,6 +833,10 @@ if prop is None: self.prop=FontProperties(size=rcParams["legend.fontsize"]) + elif isinstance(prop, dict): + self.prop=FontProperties(**prop) + if "size" not in prop: + self.prop.set_size(rcParams["legend.fontsize"]) else: self.prop = prop Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-07-29 21:28:50 UTC (rev 7307) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-07-30 17:08:23 UTC (rev 7308) @@ -438,7 +438,7 @@ .. seealso:: :func:`~matplotlib.pyplot.legend` - For information about the location codes + """ l = gcf().legend(handles, labels, loc, **kwargs) draw_if_interactive() @@ -6322,31 +6322,69 @@ 'center' 10 =============== ============= -If none of these are locations are suitable, loc can be a 2-tuple -giving x,y in axes coords, ie:: - loc = 0, 1 # left top - loc = 0.5, 0.5 # center +Users can specify any arbitrary location for the legend using the +*bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance +of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. +For example, :: + + loc = 'upper right', bbox_to_anchor = (0.5, 0.5) +will place the legend so that the upper right corner of the legend at +the center of the axes. + +The legend location can be specified in other coordinate, by using the +*bbox_transform* keyword. + +The loc itslef can be a 2-tuple giving x,y of the lower-left corner of +the legend in axes coords (*bbox_to_anchor* is ignored). + + Keyword arguments: *isaxes*: [ True | False ] Indicates that this is an axes legend + *prop*: [ None | FontProperties | dict ] + A :class:`matplotlib.font_manager.FontProperties` + instance. If *prop* is a dictionary, a new instance will be + created with *prop*. If *None*, use rc settings. + *numpoints*: integer - The number of points in the legend line, default is 4 + The number of points in the legend for line - *prop*: [ None | FontProperties ] - A :class:`matplotlib.font_manager.FontProperties` - instance, or *None* to use rc settings. + *scatterpoints*: integer + The number of points in the legend for scatter plot + *scatteroffsets*: list of floats + a list of yoffsets for scatter symbols in legend + *markerscale*: [ None | scalar ] The relative size of legend markers vs. original. If *None*, use rc settings. + *fancybox*: [ None | False | True ] + if True, draw a frame with a round fancybox. If None, use rc + *shadow*: [ None | False | True ] If *True*, draw a shadow behind legend. If *None*, use rc settings. + *ncol* : integer + number of columns. default is 1 + + *mode* : [ "expand" | None ] + if mode is "expand", the legend will be horizontally expanded + to fill the axes area (or *bbox_to_anchor*) + + *bbox_to_anchor* : an instance of BboxBase or a tuple of 2 or 4 floats + the bbox that the legend will be anchored. + + *bbox_transform* : [ an instance of Transform | None ] + the transform for the bbox. transAxes if None. + + *title* : string + the legend title + Padding and spacing between various elements use following keywords parameters. The dimensions of these values are given as a fraction of the fontsize. Values from rcParams will be used if None. @@ -6362,9 +6400,14 @@ columnspacing the spacing between columns ================ ================================================================== + **Example:** -.. plot:: mpl_examples/api/legend_demo.py""" +.. plot:: mpl_examples/api/legend_demo.py + +Also see :ref:`plotting-guide-legend`. + +""" ret = gca().legend(*args, **kwargs) draw_if_interactive() return ret This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2009-08-15 23:05:58
|
Revision: 7495 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7495&view=rev Author: efiring Date: 2009-08-15 23:05:52 +0000 (Sat, 15 Aug 2009) Log Message: ----------- Small changes to bar kwarg handling in response to 1200213 Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 21:24:01 UTC (rev 7494) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 23:05:52 UTC (rev 7495) @@ -4076,19 +4076,11 @@ @docstring.dedent_interpd - def bar(self, left, height, width=0.8, bottom=None, - color=None, edgecolor=None, linewidth=None, - yerr=None, xerr=None, ecolor=None, capsize=3, - align='edge', orientation='vertical', log=False, - **kwargs - ): + def bar(self, left, height, width=0.8, bottom=None, **kwargs): """ call signature:: - bar(left, height, width=0.8, bottom=0, - color=None, edgecolor=None, linewidth=None, - yerr=None, xerr=None, ecolor=None, capsize=3, - align='edge', orientation='vertical', log=False) + bar(left, height, width=0.8, bottom=0, **kwargs) Make a bar plot with rectangles bounded by: @@ -4157,7 +4149,16 @@ .. plot:: mpl_examples/pylab_examples/bar_stacked.py """ if not self._hold: self.cla() - + color = kwargs.pop('color', None) + edgecolor = kwargs.pop('edgecolor', None) + linewidth = kwargs.pop('linewidth', None) + xerr = kwargs.pop('xerr', None) + yerr = kwargs.pop('yerr', None) + ecolor = kwargs.pop('ecolor', None) + capsize = kwargs.pop('capsize', 3) + align = kwargs.pop('align', 'edge') + orientation = kwargs.pop('orientation', 'vertical') + log = kwargs.pop('log', False) label = kwargs.pop('label', '') def make_iterable(x): if not iterable(x): Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 21:24:01 UTC (rev 7494) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 23:05:52 UTC (rev 7495) @@ -1713,7 +1713,7 @@ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.bar) -def bar(left, height, width=0.80000000000000004, bottom=None, color=None, edgecolor=None, linewidth=None, yerr=None, xerr=None, ecolor=None, capsize=3, align='edge', orientation='vertical', log=False, hold=None, **kwargs): +def bar(left, height, width=0.80000000000000004, bottom=None, hold=None, **kwargs): ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1721,7 +1721,7 @@ if hold is not None: ax.hold(hold) try: - ret = ax.bar(left, height, width, bottom, color, edgecolor, linewidth, yerr, xerr, ecolor, capsize, align, orientation, log, **kwargs) + ret = ax.bar(left, height, width, bottom, **kwargs) draw_if_interactive() finally: ax.hold(washold) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-31 19:50:24
|
Revision: 7620 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7620&view=rev Author: heeres Date: 2009-08-31 19:50:13 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Colormap work: - Simplify data for existing colormaps - Add a few colormaps - Allow setting of gamma - Allow using functions Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/_cm.py trunk/matplotlib/lib/matplotlib/cm.py trunk/matplotlib/lib/matplotlib/colors.py Modified: trunk/matplotlib/lib/matplotlib/_cm.py =================================================================== --- trunk/matplotlib/lib/matplotlib/_cm.py 2009-08-31 17:42:37 UTC (rev 7619) +++ trunk/matplotlib/lib/matplotlib/_cm.py 2009-08-31 19:50:13 UTC (rev 7620) @@ -4,6 +4,8 @@ """ +import numpy as np + _binary_data = { 'red' : ((0., 1., 1.), (1., 0., 0.)), 'green': ((0., 1., 1.), (1., 0., 0.)), @@ -32,96 +34,115 @@ 'green': ((0., 0., 0.),(1.0, 0.7812, 0.7812)), 'blue': ((0., 0., 0.),(1.0, 0.4975, 0.4975))} -_flag_data = {'red': ((0., 1., 1.),(0.015873, 1.000000, 1.000000), - (0.031746, 0.000000, 0.000000),(0.047619, 0.000000, 0.000000), - (0.063492, 1.000000, 1.000000),(0.079365, 1.000000, 1.000000), - (0.095238, 0.000000, 0.000000),(0.111111, 0.000000, 0.000000), - (0.126984, 1.000000, 1.000000),(0.142857, 1.000000, 1.000000), - (0.158730, 0.000000, 0.000000),(0.174603, 0.000000, 0.000000), - (0.190476, 1.000000, 1.000000),(0.206349, 1.000000, 1.000000), - (0.222222, 0.000000, 0.000000),(0.238095, 0.000000, 0.000000), - (0.253968, 1.000000, 1.000000),(0.269841, 1.000000, 1.000000), - (0.285714, 0.000000, 0.000000),(0.301587, 0.000000, 0.000000), - (0.317460, 1.000000, 1.000000),(0.333333, 1.000000, 1.000000), - (0.349206, 0.000000, 0.000000),(0.365079, 0.000000, 0.000000), - (0.380952, 1.000000, 1.000000),(0.396825, 1.000000, 1.000000), - (0.412698, 0.000000, 0.000000),(0.428571, 0.000000, 0.000000), - (0.444444, 1.000000, 1.000000),(0.460317, 1.000000, 1.000000), - (0.476190, 0.000000, 0.000000),(0.492063, 0.000000, 0.000000), - (0.507937, 1.000000, 1.000000),(0.523810, 1.000000, 1.000000), - (0.539683, 0.000000, 0.000000),(0.555556, 0.000000, 0.000000), - (0.571429, 1.000000, 1.000000),(0.587302, 1.000000, 1.000000), - (0.603175, 0.000000, 0.000000),(0.619048, 0.000000, 0.000000), - (0.634921, 1.000000, 1.000000),(0.650794, 1.000000, 1.000000), - (0.666667, 0.000000, 0.000000),(0.682540, 0.000000, 0.000000), - (0.698413, 1.000000, 1.000000),(0.714286, 1.000000, 1.000000), - (0.730159, 0.000000, 0.000000),(0.746032, 0.000000, 0.000000), - (0.761905, 1.000000, 1.000000),(0.777778, 1.000000, 1.000000), - (0.793651, 0.000000, 0.000000),(0.809524, 0.000000, 0.000000), - (0.825397, 1.000000, 1.000000),(0.841270, 1.000000, 1.000000), - (0.857143, 0.000000, 0.000000),(0.873016, 0.000000, 0.000000), - (0.888889, 1.000000, 1.000000),(0.904762, 1.000000, 1.000000), - (0.920635, 0.000000, 0.000000),(0.936508, 0.000000, 0.000000), - (0.952381, 1.000000, 1.000000),(0.968254, 1.000000, 1.000000), - (0.984127, 0.000000, 0.000000),(1.0, 0., 0.)), - 'green': ((0., 0., 0.),(0.015873, 1.000000, 1.000000), - (0.031746, 0.000000, 0.000000),(0.063492, 0.000000, 0.000000), - (0.079365, 1.000000, 1.000000),(0.095238, 0.000000, 0.000000), - (0.126984, 0.000000, 0.000000),(0.142857, 1.000000, 1.000000), - (0.158730, 0.000000, 0.000000),(0.190476, 0.000000, 0.000000), - (0.206349, 1.000000, 1.000000),(0.222222, 0.000000, 0.000000), - (0.253968, 0.000000, 0.000000),(0.269841, 1.000000, 1.000000), - (0.285714, 0.000000, 0.000000),(0.317460, 0.000000, 0.000000), - (0.333333, 1.000000, 1.000000),(0.349206, 0.000000, 0.000000), - (0.380952, 0.000000, 0.000000),(0.396825, 1.000000, 1.000000), - (0.412698, 0.000000, 0.000000),(0.444444, 0.000000, 0.000000), - (0.460317, 1.000000, 1.000000),(0.476190, 0.000000, 0.000000), - (0.507937, 0.000000, 0.000000),(0.523810, 1.000000, 1.000000), - (0.539683, 0.000000, 0.000000),(0.571429, 0.000000, 0.000000), - (0.587302, 1.000000, 1.000000),(0.603175, 0.000000, 0.000000), - (0.634921, 0.000000, 0.000000),(0.650794, 1.000000, 1.000000), - (0.666667, 0.000000, 0.000000),(0.698413, 0.000000, 0.000000), - (0.714286, 1.000000, 1.000000),(0.730159, 0.000000, 0.000000), - (0.761905, 0.000000, 0.000000),(0.777778, 1.000000, 1.000000), - (0.793651, 0.000000, 0.000000),(0.825397, 0.000000, 0.000000), - (0.841270, 1.000000, 1.000000),(0.857143, 0.000000, 0.000000), - (0.888889, 0.000000, 0.000000),(0.904762, 1.000000, 1.000000), - (0.920635, 0.000000, 0.000000),(0.952381, 0.000000, 0.000000), - (0.968254, 1.000000, 1.000000),(0.984127, 0.000000, 0.000000), - (1.0, 0., 0.)), - 'blue': ((0., 0., 0.),(0.015873, 1.000000, 1.000000), - (0.031746, 1.000000, 1.000000),(0.047619, 0.000000, 0.000000), - (0.063492, 0.000000, 0.000000),(0.079365, 1.000000, 1.000000), - (0.095238, 1.000000, 1.000000),(0.111111, 0.000000, 0.000000), - (0.126984, 0.000000, 0.000000),(0.142857, 1.000000, 1.000000), - (0.158730, 1.000000, 1.000000),(0.174603, 0.000000, 0.000000), - (0.190476, 0.000000, 0.000000),(0.206349, 1.000000, 1.000000), - (0.222222, 1.000000, 1.000000),(0.238095, 0.000000, 0.000000), - (0.253968, 0.000000, 0.000000),(0.269841, 1.000000, 1.000000), - (0.285714, 1.000000, 1.000000),(0.301587, 0.000000, 0.000000), - (0.317460, 0.000000, 0.000000),(0.333333, 1.000000, 1.000000), - (0.349206, 1.000000, 1.000000),(0.365079, 0.000000, 0.000000), - (0.380952, 0.000000, 0.000000),(0.396825, 1.000000, 1.000000), - (0.412698, 1.000000, 1.000000),(0.428571, 0.000000, 0.000000), - (0.444444, 0.000000, 0.000000),(0.460317, 1.000000, 1.000000), - (0.476190, 1.000000, 1.000000),(0.492063, 0.000000, 0.000000), - (0.507937, 0.000000, 0.000000),(0.523810, 1.000000, 1.000000), - (0.539683, 1.000000, 1.000000),(0.555556, 0.000000, 0.000000), - (0.571429, 0.000000, 0.000000),(0.587302, 1.000000, 1.000000), - (0.603175, 1.000000, 1.000000),(0.619048, 0.000000, 0.000000), - (0.634921, 0.000000, 0.000000),(0.650794, 1.000000, 1.000000), - (0.666667, 1.000000, 1.000000),(0.682540, 0.000000, 0.000000), - (0.698413, 0.000000, 0.000000),(0.714286, 1.000000, 1.000000), - (0.730159, 1.000000, 1.000000),(0.746032, 0.000000, 0.000000), - (0.761905, 0.000000, 0.000000),(0.777778, 1.000000, 1.000000), - (0.793651, 1.000000, 1.000000),(0.809524, 0.000000, 0.000000), - (0.825397, 0.000000, 0.000000),(0.841270, 1.000000, 1.000000), - (0.857143, 1.000000, 1.000000),(0.873016, 0.000000, 0.000000), - (0.888889, 0.000000, 0.000000),(0.904762, 1.000000, 1.000000), - (0.920635, 1.000000, 1.000000),(0.936508, 0.000000, 0.000000), - (0.952381, 0.000000, 0.000000),(0.968254, 1.000000, 1.000000), - (0.984127, 1.000000, 1.000000),(1.0, 0., 0.))} +_flag_data = { + 'red': lambda x: 0.75 * np.sin((x * 31.5 + 0.25) * np.pi) + 0.5, + 'green': lambda x: np.sin(x * 31.5 * np.pi), + 'blue': lambda x: 0.75 * np.sin((x * 31.5 - 0.25) * np.pi) + 0.5, +} +_prism_data = { + 'red': lambda x: 0.75 * np.sin((x * 20.9 + 0.25) * np.pi) + 0.67, + 'green': lambda x: 0.75 * np.sin((x * 20.9 - 0.25) * np.pi) + 0.33, + 'blue': lambda x: -1.1 * np.sin((x * 20.9) * np.pi), +} + +_bwr_data = ((0.0, 0.0, 1.0), (1.0, 1.0, 1.0), (1.0, 0.0, 0.0)) +_brg_data = ((0.0, 0.0, 1.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)) + +# Gnuplot palette functions +gfunc = { + 0: lambda x: 0, + 1: lambda x: 0.5, + 2: lambda x: 1, + 3: lambda x: x, + 4: lambda x: x**2, + 5: lambda x: x**3, + 6: lambda x: x**4, + 7: lambda x: np.sqrt(x), + 8: lambda x: np.sqrt(np.sqrt(x)), + 9: lambda x: np.sin(x * np.pi / 2), + 10: lambda x: np.cos(x * np.pi / 2), + 11: lambda x: np.abs(x - 0.5), + 12: lambda x: (2 * x - 1)**2, + 13: lambda x: np.sin(x * np.pi), + 14: lambda x: np.abs(np.cos(x * np.pi)), + 15: lambda x: np.sin(x * 2 * np.pi), + 16: lambda x: np.cos(x * 2 * np.pi), + 17: lambda x: np.abs(np.sin(x * 2 * np.pi)), + 18: lambda x: np.abs(np.cos(x * 2 * np.pi)), + 19: lambda x: np.abs(np.sin(x * 4 * np.pi)), + 20: lambda x: np.abs(np.cos(x * 4 * np.pi)), + 21: lambda x: 3 * x, + 22: lambda x: 3 * x - 1, + 23: lambda x: 3 * x - 2, + 24: lambda x: np.abs(3 * x - 1), + 25: lambda x: np.abs(3 * x - 2), + 26: lambda x: (3 * x - 1) / 2, + 27: lambda x: (3 * x - 2) / 2, + 28: lambda x: np.abs((3 * x - 1) / 2), + 29: lambda x: np.abs((3 * x - 2) / 2), + 30: lambda x: x / 0.32 - 0.78125, + 31: lambda x: 2 * x - 0.84, + 32: lambda x: gfunc32(x), + 33: lambda x: np.abs(2 * x - 0.5), + 34: lambda x: 2 * x, + 35: lambda x: 2 * x - 0.5, + 36: lambda x: 2 * x - 1. +} + +def gfunc32(x): + ret = np.zeros(len(x)) + m = (x < 0.25) + ret[m] = 4 * x[m] + m = (x >= 0.25) & (x < 0.92) + ret[m] = -2 * x[m] + 1.84 + m = (x >= 0.92) + ret[m] = x[m] / 0.08 - 11.5 + return ret + +_gnuplot_data = { + 'red': gfunc[7], + 'green': gfunc[5], + 'blue': gfunc[15], +} + +_gnuplot2_data = { + 'red': gfunc[30], + 'green': gfunc[31], + 'blue': gfunc[32], +} + +_ocean_data = { + 'red': gfunc[23], + 'green': gfunc[28], + 'blue': gfunc[3], +} + +_afmhot_data = { + 'red': gfunc[34], + 'green': gfunc[35], + 'blue': gfunc[36], +} + +_rainbow_data = { + 'red': gfunc[33], + 'green': gfunc[13], + 'blue': gfunc[10], +} + +_seismic_data = ( + (0.0, 0.0, 0.3), (0.0, 0.0, 1.0), + (1.0, 1.0, 1.0), (1.0, 0.0, 0.0), + (0.5, 0.0, 0.0)) + +_terrain_data = ( + (0.00, (0.2, 0.2, 0.6)), + (0.15, (0.0, 0.6, 1.0)), + (0.25, (0.0, 0.8, 0.4)), + (0.50, (1.0, 1.0, 0.6)), + (0.75, (0.5, 0.36, 0.33)), + (1.00, (1.0, 1.0, 1.0))) + _gray_data = {'red': ((0., 0, 0), (1., 1, 1)), 'green': ((0., 0, 0), (1., 1, 1)), 'blue': ((0., 0, 0), (1., 1, 1))} @@ -249,77 +270,6 @@ (0.952381, 0.951711, 0.951711),(0.968254, 0.968075, 0.968075), (0.984127, 0.984167, 0.984167),(1.0, 1.0, 1.0))} -_prism_data = {'red': ((0., 1., 1.),(0.031746, 1.000000, 1.000000), - (0.047619, 0.000000, 0.000000),(0.063492, 0.000000, 0.000000), - (0.079365, 0.666667, 0.666667),(0.095238, 1.000000, 1.000000), - (0.126984, 1.000000, 1.000000),(0.142857, 0.000000, 0.000000), - (0.158730, 0.000000, 0.000000),(0.174603, 0.666667, 0.666667), - (0.190476, 1.000000, 1.000000),(0.222222, 1.000000, 1.000000), - (0.238095, 0.000000, 0.000000),(0.253968, 0.000000, 0.000000), - (0.269841, 0.666667, 0.666667),(0.285714, 1.000000, 1.000000), - (0.317460, 1.000000, 1.000000),(0.333333, 0.000000, 0.000000), - (0.349206, 0.000000, 0.000000),(0.365079, 0.666667, 0.666667), - (0.380952, 1.000000, 1.000000),(0.412698, 1.000000, 1.000000), - (0.428571, 0.000000, 0.000000),(0.444444, 0.000000, 0.000000), - (0.460317, 0.666667, 0.666667),(0.476190, 1.000000, 1.000000), - (0.507937, 1.000000, 1.000000),(0.523810, 0.000000, 0.000000), - (0.539683, 0.000000, 0.000000),(0.555556, 0.666667, 0.666667), - (0.571429, 1.000000, 1.000000),(0.603175, 1.000000, 1.000000), - (0.619048, 0.000000, 0.000000),(0.634921, 0.000000, 0.000000), - (0.650794, 0.666667, 0.666667),(0.666667, 1.000000, 1.000000), - (0.698413, 1.000000, 1.000000),(0.714286, 0.000000, 0.000000), - (0.730159, 0.000000, 0.000000),(0.746032, 0.666667, 0.666667), - (0.761905, 1.000000, 1.000000),(0.793651, 1.000000, 1.000000), - (0.809524, 0.000000, 0.000000),(0.825397, 0.000000, 0.000000), - (0.841270, 0.666667, 0.666667),(0.857143, 1.000000, 1.000000), - (0.888889, 1.000000, 1.000000),(0.904762, 0.000000, 0.000000), - (0.920635, 0.000000, 0.000000),(0.936508, 0.666667, 0.666667), - (0.952381, 1.000000, 1.000000),(0.984127, 1.000000, 1.000000), - (1.0, 0.0, 0.0)), - 'green': ((0., 0., 0.),(0.031746, 1.000000, 1.000000), - (0.047619, 1.000000, 1.000000),(0.063492, 0.000000, 0.000000), - (0.095238, 0.000000, 0.000000),(0.126984, 1.000000, 1.000000), - (0.142857, 1.000000, 1.000000),(0.158730, 0.000000, 0.000000), - (0.190476, 0.000000, 0.000000),(0.222222, 1.000000, 1.000000), - (0.238095, 1.000000, 1.000000),(0.253968, 0.000000, 0.000000), - (0.285714, 0.000000, 0.000000),(0.317460, 1.000000, 1.000000), - (0.333333, 1.000000, 1.000000),(0.349206, 0.000000, 0.000000), - (0.380952, 0.000000, 0.000000),(0.412698, 1.000000, 1.000000), - (0.428571, 1.000000, 1.000000),(0.444444, 0.000000, 0.000000), - (0.476190, 0.000000, 0.000000),(0.507937, 1.000000, 1.000000), - (0.523810, 1.000000, 1.000000),(0.539683, 0.000000, 0.000000), - (0.571429, 0.000000, 0.000000),(0.603175, 1.000000, 1.000000), - (0.619048, 1.000000, 1.000000),(0.634921, 0.000000, 0.000000), - (0.666667, 0.000000, 0.000000),(0.698413, 1.000000, 1.000000), - (0.714286, 1.000000, 1.000000),(0.730159, 0.000000, 0.000000), - (0.761905, 0.000000, 0.000000),(0.793651, 1.000000, 1.000000), - (0.809524, 1.000000, 1.000000),(0.825397, 0.000000, 0.000000), - (0.857143, 0.000000, 0.000000),(0.888889, 1.000000, 1.000000), - (0.904762, 1.000000, 1.000000),(0.920635, 0.000000, 0.000000), - (0.952381, 0.000000, 0.000000),(0.984127, 1.000000, 1.000000), - (1.0, 1.0, 1.0)), - 'blue': ((0., 0., 0.),(0.047619, 0.000000, 0.000000), - (0.063492, 1.000000, 1.000000),(0.079365, 1.000000, 1.000000), - (0.095238, 0.000000, 0.000000),(0.142857, 0.000000, 0.000000), - (0.158730, 1.000000, 1.000000),(0.174603, 1.000000, 1.000000), - (0.190476, 0.000000, 0.000000),(0.238095, 0.000000, 0.000000), - (0.253968, 1.000000, 1.000000),(0.269841, 1.000000, 1.000000), - (0.285714, 0.000000, 0.000000),(0.333333, 0.000000, 0.000000), - (0.349206, 1.000000, 1.000000),(0.365079, 1.000000, 1.000000), - (0.380952, 0.000000, 0.000000),(0.428571, 0.000000, 0.000000), - (0.444444, 1.000000, 1.000000),(0.460317, 1.000000, 1.000000), - (0.476190, 0.000000, 0.000000),(0.523810, 0.000000, 0.000000), - (0.539683, 1.000000, 1.000000),(0.555556, 1.000000, 1.000000), - (0.571429, 0.000000, 0.000000),(0.619048, 0.000000, 0.000000), - (0.634921, 1.000000, 1.000000),(0.650794, 1.000000, 1.000000), - (0.666667, 0.000000, 0.000000),(0.714286, 0.000000, 0.000000), - (0.730159, 1.000000, 1.000000),(0.746032, 1.000000, 1.000000), - (0.761905, 0.000000, 0.000000),(0.809524, 0.000000, 0.000000), - (0.825397, 1.000000, 1.000000),(0.841270, 1.000000, 1.000000), - (0.857143, 0.000000, 0.000000),(0.904762, 0.000000, 0.000000), - (0.920635, 1.000000, 1.000000),(0.936508, 1.000000, 1.000000), - (0.952381, 0.000000, 0.000000),(1.0, 0.0, 0.0))} - _spring_data = {'red': ((0., 1., 1.),(1.0, 1.0, 1.0)), 'green': ((0., 0., 0.),(1.0, 1.0, 1.0)), 'blue': ((0., 1., 1.),(1.0, 0.0, 0.0))} @@ -1470,4362 +1420,176 @@ # an evolution of the GIST package, both by David H. Munro. # They are released under a BSD-like license (see LICENSE_YORICK in # the license directory of the matplotlib source distribution). -_gist_earth_data = {'blue': [(0.0, 0.0, 0.0), (0.0042016808874905109, -0.18039216101169586, 0.18039216101169586), (0.0084033617749810219, -0.22745098173618317, 0.22745098173618317), (0.012605042196810246, -0.27058824896812439, 0.27058824896812439), (0.016806723549962044, -0.31764706969261169, 0.31764706969261169), (0.021008403971791267, -0.36078432202339172, 0.36078432202339172), (0.025210084393620491, -0.40784314274787903, 0.40784314274787903), (0.029411764815449715, -0.45490196347236633, 0.45490196347236633), (0.033613447099924088, -0.45490196347236633, 0.45490196347236633), (0.037815127521753311, -0.45490196347236633, 0.45490196347236633), (0.042016807943582535, -0.45490196347236633, 0.45490196347236633), (0.046218488365411758, -0.45490196347236633, 0.45490196347236633), (0.050420168787240982, -0.45882353186607361, 0.45882353186607361), (0.054621849209070206, -0.45882353186607361, 0.45882353186607361), (0.058823529630899429, -0.45882353186607361, 0.45882353186607361), (0.063025213778018951, -0.45882353186607361, 0.45882353186607361), (0.067226894199848175, -0.45882353186607361, 0.45882353186607361), (0.071428574621677399, -0.46274510025978088, 0.46274510025978088), (0.075630255043506622, -0.46274510025978088, 0.46274510025978088), (0.079831935465335846, -0.46274510025978088, 0.46274510025978088), (0.08403361588716507, -0.46274510025978088, 0.46274510025978088), (0.088235296308994293, -0.46274510025978088, 0.46274510025978088), (0.092436976730823517, -0.46666666865348816, 0.46666666865348816), (0.09663865715265274, -0.46666666865348816, 0.46666666865348816), (0.10084033757448196, -0.46666666865348816, 0.46666666865348816), (0.10504201799631119, -0.46666666865348816, 0.46666666865348816), (0.10924369841814041, -0.46666666865348816, 0.46666666865348816), (0.11344537883996964, -0.47058823704719543, 0.47058823704719543), (0.11764705926179886, -0.47058823704719543, 0.47058823704719543), (0.12184873968362808, -0.47058823704719543, 0.47058823704719543), (0.1260504275560379, -0.47058823704719543, 0.47058823704719543), (0.13025210797786713, -0.47058823704719543, 0.47058823704719543), (0.13445378839969635, -0.47450980544090271, 0.47450980544090271), (0.13865546882152557, -0.47450980544090271, 0.47450980544090271), (0.1428571492433548, -0.47450980544090271, 0.47450980544090271), (0.14705882966518402, -0.47450980544090271, 0.47450980544090271), (0.15126051008701324, -0.47450980544090271, 0.47450980544090271), (0.15546219050884247, -0.47843137383460999, 0.47843137383460999), (0.15966387093067169, -0.47843137383460999, 0.47843137383460999), (0.16386555135250092, -0.47843137383460999, 0.47843137383460999), (0.16806723177433014, -0.47843137383460999, 0.47843137383460999), (0.17226891219615936, -0.47843137383460999, 0.47843137383460999), (0.17647059261798859, -0.48235294222831726, 0.48235294222831726), (0.18067227303981781, -0.48235294222831726, 0.48235294222831726), (0.18487395346164703, -0.48235294222831726, 0.48235294222831726), (0.18907563388347626, -0.48235294222831726, 0.48235294222831726), (0.19327731430530548, -0.48235294222831726, 0.48235294222831726), (0.1974789947271347, -0.48627451062202454, 0.48627451062202454), (0.20168067514896393, -0.48627451062202454, 0.48627451062202454), (0.20588235557079315, -0.48627451062202454, 0.48627451062202454), (0.21008403599262238, -0.48627451062202454, 0.48627451062202454), (0.2142857164144516, -0.48627451062202454, 0.48627451062202454), (0.21848739683628082, -0.49019607901573181, 0.49019607901573181), (0.22268907725811005, -0.49019607901573181, 0.49019607901573181), (0.22689075767993927, -0.49019607901573181, 0.49019607901573181), (0.23109243810176849, -0.49019607901573181, 0.49019607901573181), (0.23529411852359772, -0.49019607901573181, 0.49019607901573181), (0.23949579894542694, -0.49411764740943909, 0.49411764740943909), (0.24369747936725616, -0.49411764740943909, 0.49411764740943909), (0.24789915978908539, -0.49411764740943909, 0.49411764740943909), (0.25210085511207581, -0.49411764740943909, 0.49411764740943909), (0.25630253553390503, -0.49411764740943909, 0.49411764740943909), (0.26050421595573425, -0.49803921580314636, 0.49803921580314636), (0.26470589637756348, -0.49803921580314636, 0.49803921580314636), (0.2689075767993927, -0.49803921580314636, 0.49803921580314636), (0.27310925722122192, -0.49803921580314636, 0.49803921580314636), (0.27731093764305115, -0.49803921580314636, 0.49803921580314636), (0.28151261806488037, -0.50196081399917603, 0.50196081399917603), (0.28571429848670959, -0.49411764740943909, 0.49411764740943909), (0.28991597890853882, -0.49019607901573181, 0.49019607901573181), (0.29411765933036804, -0.48627451062202454, 0.48627451062202454), (0.29831933975219727, -0.48235294222831726, 0.48235294222831726), (0.30252102017402649, -0.47843137383460999, 0.47843137383460999), (0.30672270059585571, -0.47058823704719543, 0.47058823704719543), (0.31092438101768494, -0.46666666865348816, 0.46666666865348816), (0.31512606143951416, -0.46274510025978088, 0.46274510025978088), (0.31932774186134338, -0.45882353186607361, 0.45882353186607361), (0.32352942228317261, -0.45098039507865906, 0.45098039507865906), (0.32773110270500183, -0.44705882668495178, 0.44705882668495178), (0.33193278312683105, -0.44313725829124451, 0.44313725829124451), (0.33613446354866028, -0.43529412150382996, 0.43529412150382996), (0.3403361439704895, -0.43137255311012268, 0.43137255311012268), (0.34453782439231873, -0.42745098471641541, 0.42745098471641541), (0.34873950481414795, -0.42352941632270813, 0.42352941632270813), (0.35294118523597717, -0.41568627953529358, 0.41568627953529358), (0.3571428656578064, -0.4117647111415863, 0.4117647111415863), (0.36134454607963562, -0.40784314274787903, 0.40784314274787903), (0.36554622650146484, -0.40000000596046448, 0.40000000596046448), (0.36974790692329407, -0.3960784375667572, 0.3960784375667572), (0.37394958734512329, -0.39215686917304993, 0.39215686917304993), (0.37815126776695251, -0.38431373238563538, 0.38431373238563538), (0.38235294818878174, -0.3803921639919281, 0.3803921639919281), (0.38655462861061096, -0.37647059559822083, 0.37647059559822083), (0.39075630903244019, -0.36862745881080627, 0.36862745881080627), (0.39495798945426941, -0.364705890417099, 0.364705890417099), (0.39915966987609863, -0.36078432202339172, 0.36078432202339172), (0.40336135029792786, -0.35294118523597717, 0.35294118523597717), (0.40756303071975708, -0.3490196168422699, 0.3490196168422699), (0.4117647111415863, -0.34509804844856262, 0.34509804844856262), (0.41596639156341553, -0.33725491166114807, 0.33725491166114807), (0.42016807198524475, -0.3333333432674408, 0.3333333432674408), (0.42436975240707397, -0.32941177487373352, 0.32941177487373352), (0.4285714328289032, -0.32156863808631897, 0.32156863808631897), (0.43277311325073242, -0.31764706969261169, 0.31764706969261169), (0.43697479367256165, -0.31372550129890442, 0.31372550129890442), (0.44117647409439087, -0.30588236451148987, 0.30588236451148987), (0.44537815451622009, -0.30196079611778259, 0.30196079611778259), (0.44957983493804932, -0.29803922772407532, 0.29803922772407532), (0.45378151535987854, -0.29019609093666077, 0.29019609093666077), (0.45798319578170776, -0.28627452254295349, 0.28627452254295349), (0.46218487620353699, -0.27843138575553894, 0.27843138575553894), (0.46638655662536621, -0.27450981736183167, 0.27450981736183167), (0.47058823704719543, -0.27843138575553894, 0.27843138575553894), (0.47478991746902466, -0.28235295414924622, 0.28235295414924622), (0.47899159789085388, -0.28235295414924622, 0.28235295414924622), (0.48319327831268311, -0.28627452254295349, 0.28627452254295349), (0.48739495873451233, -0.28627452254295349, 0.28627452254295349), (0.49159663915634155, -0.29019609093666077, 0.29019609093666077), (0.49579831957817078, -0.29411765933036804, 0.29411765933036804), (0.5, 0.29411765933036804, -0.29411765933036804), (0.50420171022415161, 0.29803922772407532, -0.29803922772407532), (0.50840336084365845, 0.29803922772407532, -0.29803922772407532), (0.51260507106781006, 0.30196079611778259, -0.30196079611778259), (0.51680672168731689, 0.30196079611778259, -0.30196079611778259), (0.52100843191146851, 0.30588236451148987, -0.30588236451148987), (0.52521008253097534, 0.30980393290519714, -0.30980393290519714), (0.52941179275512695, 0.30980393290519714, -0.30980393290519714), (0.53361344337463379, 0.31372550129890442, -0.31372550129890442), (0.5378151535987854, 0.31372550129890442, -0.31372550129890442), (0.54201680421829224, 0.31764706969261169, -0.31764706969261169), (0.54621851444244385, 0.32156863808631897, -0.32156863808631897), (0.55042016506195068, 0.32156863808631897, -0.32156863808631897), (0.55462187528610229, 0.32156863808631897, -0.32156863808631897), (0.55882352590560913, 0.32549020648002625, -0.32549020648002625), (0.56302523612976074, 0.32549020648002625, -0.32549020648002625), (0.56722688674926758, 0.32549020648002625, -0.32549020648002625), (0.57142859697341919, 0.32941177487373352, -0.32941177487373352), (0.57563024759292603, 0.32941177487373352, -0.32941177487373352), (0.57983195781707764, 0.32941177487373352, -0.32941177487373352), (0.58403360843658447, 0.3333333432674408, -0.3333333432674408), (0.58823531866073608, 0.3333333432674408, -0.3333333432674408), (0.59243696928024292, 0.3333333432674408, -0.3333333432674408), (0.59663867950439453, 0.33725491166114807, -0.33725491166114807), (0.60084033012390137, 0.33725491166114807, -0.33725491166114807), (0.60504204034805298, 0.33725491166114807, -0.33725491166114807), (0.60924369096755981, 0.34117648005485535, -0.34117648005485535), (0.61344540119171143, 0.34117648005485535, -0.34117648005485535), (0.61764705181121826, 0.34117648005485535, -0.34117648005485535), (0.62184876203536987, 0.34509804844856262, -0.34509804844856262), (0.62605041265487671, 0.34509804844856262, -0.34509804844856262), (0.63025212287902832, 0.34509804844856262, -0.34509804844856262), (0.63445377349853516, 0.3490196168422699, -0.3490196168422699), (0.63865548372268677, 0.3490196168422699, -0.3490196168422699), (0.6428571343421936, 0.3490196168422699, -0.3490196168422699), (0.64705884456634521, 0.35294118523597717, -0.35294118523597717), (0.65126049518585205, 0.35294118523597717, -0.35294118523597717), (0.65546220541000366, 0.35294118523597717, -0.35294118523597717), (0.6596638560295105, 0.35686275362968445, -0.35686275362968445), (0.66386556625366211, 0.35686275362968445, -0.35686275362968445), (0.66806721687316895, 0.35686275362968445, -0.35686275362968445), (0.67226892709732056, 0.36078432202339172, -0.36078432202339172), (0.67647057771682739, 0.36078432202339172, -0.36078432202339172), (0.680672287940979, 0.36078432202339172, -0.36078432202339172), (0.68487393856048584, 0.364705890417099, -0.364705890417099), (0.68907564878463745, 0.364705890417099, -0.364705890417099), (0.69327729940414429, 0.364705890417099, -0.364705890417099), (0.6974790096282959, 0.36862745881080627, -0.36862745881080627), (0.70168066024780273, 0.36862745881080627, -0.36862745881080627), (0.70588237047195435, 0.36862745881080627, -0.36862745881080627), (0.71008402109146118, 0.37254902720451355, -0.37254902720451355), (0.71428573131561279, 0.37254902720451355, -0.37254902720451355), (0.71848738193511963, 0.37254902720451355, -0.37254902720451355), (0.72268909215927124, 0.37647059559822083, -0.37647059559822083), (0.72689074277877808, 0.37647059559822083, -0.37647059559822083), (0.73109245300292969, 0.3803921639919281, -0.3803921639919281), (0.73529410362243652, 0.3803921639919281, -0.3803921639919281), (0.73949581384658813, 0.3803921639919281, -0.3803921639919281), (0.74369746446609497, 0.38431373238563538, -0.38431373238563538), (0.74789917469024658, 0.38431373238563538, -0.38431373238563538), (0.75210082530975342, 0.38431373238563538, -0.38431373238563538), (0.75630253553390503, 0.38823530077934265, -0.38823530077934265), (0.76050418615341187, 0.38823530077934265, -0.38823530077934265), (0.76470589637756348, 0.38823530077934265, -0.38823530077934265), (0.76890754699707031, 0.39215686917304993, -0.39215686917304993), (0.77310925722122192, 0.39215686917304993, -0.39215686917304993), (0.77731090784072876, 0.39215686917304993, -0.39215686917304993), (0.78151261806488037, 0.3960784375667572, -0.3960784375667572), (0.78571426868438721, 0.3960784375667572, -0.3960784375667572), (0.78991597890853882, 0.40784314274787903, -0.40784314274787903), (0.79411762952804565, 0.41568627953529358, -0.41568627953529358), (0.79831933975219727, 0.42352941632270813, -0.42352941632270813), (0.8025209903717041, 0.43529412150382996, -0.43529412150382996), (0.80672270059585571, 0.44313725829124451, -0.44313725829124451), (0.81092435121536255, 0.45490196347236633, -0.45490196347236633), (0.81512606143951416, 0.46274510025978088, -0.46274510025978088), (0.819327712059021, 0.47450980544090271, -0.47450980544090271), (0.82352942228317261, 0.48235294222831726, -0.48235294222831726), (0.82773107290267944, 0.49411764740943909, -0.49411764740943909), (0.83193278312683105, 0.5058823823928833, -0.5058823823928833), (0.83613443374633789, 0.51372551918029785, -0.51372551918029785), (0.8403361439704895, 0.52549022436141968, -0.52549022436141968), (0.84453779458999634, 0.5372549295425415, -0.5372549295425415), (0.84873950481414795, 0.54509806632995605, -0.54509806632995605), (0.85294115543365479, 0.55686277151107788, -0.55686277151107788), (0.8571428656578064, 0.56862747669219971, -0.56862747669219971), (0.86134451627731323, 0.58039218187332153, -0.58039218187332153), (0.86554622650146484, 0.58823531866073608, -0.58823531866073608), (0.86974787712097168, 0.60000002384185791, -0.60000002384185791), (0.87394958734512329, 0.61176472902297974, -0.61176472902297974), (0.87815123796463013, 0.62352943420410156, -0.62352943420410156), (0.88235294818878174, 0.63529413938522339, -0.63529413938522339), (0.88655459880828857, 0.64705884456634521, -0.64705884456634521), (0.89075630903244019, 0.65882354974746704, -0.65882354974746704), (0.89495795965194702, 0.66666668653488159, -0.66666668653488159), (0.89915966987609863, 0.67843139171600342, -0.67843139171600342), (0.90336132049560547, 0.69019609689712524, -0.69019609689712524), (0.90756303071975708, 0.70196080207824707, -0.70196080207824707), (0.91176468133926392, 0.7137255072593689, -0.7137255072593689), (0.91596639156341553, 0.72549021244049072, -0.72549021244049072), (0.92016804218292236, 0.74117648601531982, -0.74117648601531982), (0.92436975240707397, 0.75294119119644165, -0.75294119119644165), (0.92857140302658081, 0.76470589637756348, -0.76470589637756348), (0.93277311325073242, 0.7764706015586853, -0.7764706015586853), (0.93697476387023926, 0.78823530673980713, -0.78823530673980713), (0.94117647409439087, 0.80000001192092896, -0.80000001192092896), (0.94537812471389771, 0.81176471710205078, -0.81176471710205078), (0.94957983493804932, 0.82745099067687988, -0.82745099067687988), (0.95378148555755615, 0.83921569585800171, -0.83921569585800171), (0.95798319578170776, 0.85098040103912354, -0.85098040103912354), (0.9621848464012146, 0.86274510622024536, -0.86274510622024536), (0.96638655662536621, 0.87843137979507446, -0.87843137979507446), (0.97058820724487305, 0.89019608497619629, -0.89019608497619629), (0.97478991746902466, 0.90196079015731812, -0.90196079015731812), (0.97899156808853149, 0.91764706373214722, -0.91764706373214722), (0.98319327831268311, 0.92941176891326904, -0.92941176891326904), (0.98739492893218994, 0.94509804248809814, -0.94509804248809814), (0.99159663915634155, 0.95686274766921997, -0.95686274766921997), (0.99579828977584839, 0.97254902124404907, -0.97254902124404907), (1.0, 0.9843137264251709, 0.9843137264251709)], -'green': [(0.0, 0.0, 0.0), (0.0042016808874905109, 0.0, 0.0), -(0.0084033617749810219, 0.0, 0.0), (0.012605042196810246, 0.0, 0.0), -(0.016806723549962044, 0.0, 0.0), (0.021008403971791267, 0.0, 0.0), -(0.025210084393620491, 0.0, 0.0), (0.029411764815449715, 0.0, 0.0), -(0.033613447099924088, 0.011764706112444401, 0.011764706112444401), -(0.037815127521753311, 0.023529412224888802, 0.023529412224888802), -(0.042016807943582535, 0.031372550874948502, 0.031372550874948502), -(0.046218488365411758, 0.043137256056070328, 0.043137256056070328), -(0.050420168787240982, 0.050980392843484879, 0.050980392843484879), -(0.054621849209070206, 0.062745101749897003, 0.062745101749897003), -(0.058823529630899429, 0.070588238537311554, 0.070588238537311554), -(0.063025213778018951, 0.08235294371843338, 0.08235294371843338), -(0.067226894199848175, 0.090196080505847931, 0.090196080505847931), -(0.071428574621677399, 0.10196078568696976, 0.10196078568696976), -(0.075630255043506622, 0.10980392247438431, 0.10980392247438431), -(0.079831935465335846, 0.12156862765550613, 0.12156862765550613), -(0.08403361588716507, 0.12941177189350128, 0.12941177189350128), -(0.088235296308994293, 0.14117647707462311, 0.14117647707462311), -(0.092436976730823517, 0.14901961386203766, 0.14901961386203766), -(0.09663865715265274, 0.16078431904315948, 0.16078431904315948), -(0.10084033757448196, 0.16862745583057404, 0.16862745583057404), -(0.10504201799631119, 0.17647059261798859, 0.17647059261798859), -(0.10924369841814041, 0.18823529779911041, 0.18823529779911041), -(0.11344537883996964, 0.19607843458652496, 0.19607843458652496), -(0.11764705926179886, 0.20392157137393951, 0.20392157137393951), -(0.12184873968362808, 0.21568627655506134, 0.21568627655506134), -(0.1260504275560379, 0.22352941334247589, 0.22352941334247589), -(0.13025210797786713, 0.23137255012989044, 0.23137255012989044), -(0.13445378839969635, 0.23921568691730499, 0.23921568691730499), -(0.13865546882152557, 0.25098040699958801, 0.25098040699958801), -(0.1428571492433548, 0.25882354378700256, 0.25882354378700256), -(0.14705882966518402, 0.26666668057441711, 0.26666668057441711), -(0.15126051008701324, 0.27450981736183167, 0.27450981736183167), -(0.15546219050884247, 0.28235295414924622, 0.28235295414924622), -(0.15966387093067169, 0.29019609093666077, 0.29019609093666077), -(0.16386555135250092, 0.30196079611778259, 0.30196079611778259), -(0.16806723177433014, 0.30980393290519714, 0.30980393290519714), -(0.17226891219615936, 0.31764706969261169, 0.31764706969261169), -(0.17647059261798859, 0.32549020648002625, 0.32549020648002625), -(0.18067227303981781, 0.3333333432674408, 0.3333333432674408), -(0.18487395346164703, 0.34117648005485535, 0.34117648005485535), -(0.18907563388347626, 0.3490196168422699, 0.3490196168422699), -(0.19327731430530548, 0.35686275362968445, 0.35686275362968445), -(0.1974789947271347, 0.364705890417099, 0.364705890417099), -(0.20168067514896393, 0.37254902720451355, 0.37254902720451355), -(0.20588235557079315, 0.3803921639919281, 0.3803921639919281), -(0.21008403599262238, 0.38823530077934265, 0.38823530077934265), -(0.2142857164144516, 0.39215686917304993, 0.39215686917304993), -(0.21848739683628082, 0.40000000596046448, 0.40000000596046448), -(0.22268907725811005, 0.40784314274787903, 0.40784314274787903), -(0.22689075767993927, 0.41568627953529358, 0.41568627953529358), -(0.23109243810176849, 0.42352941632270813, 0.42352941632270813), -(0.23529411852359772, 0.42745098471641541, 0.42745098471641541), -(0.23949579894542694, 0.43529412150382996, 0.43529412150382996), -(0.24369747936725616, 0.44313725829124451, 0.44313725829124451), -(0.24789915978908539, 0.45098039507865906, 0.45098039507865906), -(0.25210085511207581, 0.45490196347236633, 0.45490196347236633), -(0.25630253553390503, 0.46274510025978088, 0.46274510025978088), -(0.26050421595573425, 0.47058823704719543, 0.47058823704719543), -(0.26470589637756348, 0.47450980544090271, 0.47450980544090271), -(0.2689075767993927, 0.48235294222831726, 0.48235294222831726), -(0.27310925722122192, 0.49019607901573181, 0.49019607901573181), -(0.27731093764305115, 0.49411764740943909, 0.49411764740943909), -(0.28151261806488037, 0.50196081399917603, 0.50196081399917603), -(0.28571429848670959, 0.50196081399917603, 0.50196081399917603), -(0.28991597890853882, 0.5058823823928833, 0.5058823823928833), -(0.29411765933036804, 0.5058823823928833, 0.5058823823928833), -(0.29831933975219727, 0.50980395078659058, 0.50980395078659058), -(0.30252102017402649, 0.51372551918029785, 0.51372551918029785), -(0.30672270059585571, 0.51372551918029785, 0.51372551918029785), -(0.31092438101768494, 0.51764708757400513, 0.51764708757400513), -(0.31512606143951416, 0.5215686559677124, 0.5215686559677124), -(0.31932774186134338, 0.5215686559677124, 0.5215686559677124), -(0.32352942228317261, 0.52549022436141968, 0.52549022436141968), -(0.32773110270500183, 0.52549022436141968, 0.52549022436141968), -(0.33193278312683105, 0.52941179275512695, 0.52941179275512695), -(0.33613446354866028, 0.53333336114883423, 0.53333336114883423), -(0.3403361439704895, 0.53333336114883423, 0.53333336114883423), -(0.34453782439231873, 0.5372549295425415, 0.5372549295425415), -(0.34873950481414795, 0.54117649793624878, 0.54117649793624878), -(0.35294118523597717, 0.54117649793624878, 0.54117649793624878), -(0.3571428656578064, 0.54509806632995605, 0.54509806632995605), -(0.36134454607963562, 0.54901963472366333, 0.54901963472366333), -(0.36554622650146484, 0.54901963472366333, 0.54901963472366333), -(0.36974790692329407, 0.55294120311737061, 0.55294120311737061), -(0.37394958734512329, 0.55294120311737061, 0.55294120311737061), -(0.37815126776695251, 0.55686277151107788, 0.55686277151107788), -(0.38235294818878174, 0.56078433990478516, 0.56078433990478516), -(0.38655462861061096, 0.56078433990478516, 0.56078433990478516), -(0.39075630903244019, 0.56470590829849243, 0.56470590829849243), -(0.39495798945426941, 0.56862747669219971, 0.56862747669219971), -(0.39915966987609863, 0.56862747669219971, 0.56862747669219971), -(0.40336135029792786, 0.57254904508590698, 0.57254904508590698), -(0.40756303071975708, 0.57254904508590698, 0.57254904508590698), -(0.4117647111415863, 0.57647061347961426, 0.57647061347961426), -(0.41596639156341553, 0.58039218187332153, 0.58039218187332153), -(0.42016807198524475, 0.58039218187332153, 0.58039218187332153), -(0.42436975240707397, 0.58431375026702881, 0.58431375026702881), -(0.4285714328289032, 0.58823531866073608, 0.58823531866073608), -(0.43277311325073242, 0.58823531866073608, 0.58823531866073608), -(0.43697479367256165, 0.59215688705444336, 0.59215688705444336), -(0.44117647409439087, 0.59215688705444336, 0.59215688705444336), -(0.44537815451622009, 0.59607845544815063, 0.59607845544815063), -(0.44957983493804932, 0.60000002384185791, 0.60000002384185791), -(0.45378151535987854, 0.60000002384185791, 0.60000002384185791), -(0.45798319578170776, 0.60392159223556519, 0.60392159223556519), -(0.46218487620353699, 0.60784316062927246, 0.60784316062927246), -(0.46638655662536621, 0.60784316062927246, 0.60784316062927246), -(0.47058823704719543, 0.61176472902297974, 0.61176472902297974), -(0.47478991746902466, 0.61176472902297974, 0.61176472902297974), -(0.47899159789085388, 0.61568629741668701, 0.61568629741668701), -(0.48319327831268311, 0.61960786581039429, 0.61960786581039429), -(0.48739495873451233, 0.61960786581039429, 0.61960786581039429), -(0.49159663915634155, 0.62352943420410156, 0.62352943420410156), -(0.49579831957817078, 0.62745100259780884, 0.62745100259780884), (0.5, -0.62745100259780884, 0.62745100259780884), (0.50420171022415161, -0.63137257099151611, 0.63137257099151611), (0.50840336084365845, -0.63137257099151611, 0.63137257099151611), (0.51260507106781006, -0.63529413938522339, 0.63529413938522339), (0.51680672168731689, -0.63921570777893066, 0.63921570777893066), (0.52100843191146851, -0.63921570777893066, 0.63921570777893066), (0.52521008253097534, -0.64313727617263794, 0.64313727617263794), (0.52941179275512695, -0.64705884456634521, 0.64705884456634521), (0.53361344337463379, -0.64705884456634521, 0.64705884456634521), (0.5378151535987854, -0.65098041296005249, 0.65098041296005249), (0.54201680421829224, -0.65098041296005249, 0.65098041296005249), (0.54621851444244385, -0.65490198135375977, 0.65490198135375977), (0.55042016506195068, -0.65882354974746704, 0.65882354974746704), (0.55462187528610229, -0.65882354974746704, 0.65882354974746704), (0.55882352590560913, -0.65882354974746704, 0.65882354974746704), (0.56302523612976074, -0.66274511814117432, 0.66274511814117432), (0.56722688674926758, -0.66274511814117432, 0.66274511814117432), (0.57142859697341919, -0.66666668653488159, 0.66666668653488159), (0.57563024759292603, -0.66666668653488159, 0.66666668653488159), (0.57983195781707764, -0.67058825492858887, 0.67058825492858887), (0.58403360843658447, -0.67058825492858887, 0.67058825492858887), (0.58823531866073608, -0.67450982332229614, 0.67450982332229614), (0.59243696928024292, -0.67450982332229614, 0.67450982332229614), (0.59663867950439453, -0.67450982332229614, 0.67450982332229614), (0.60084033012390137, -0.67843139171600342, 0.67843139171600342), (0.60504204034805298, -0.67843139171600342, 0.67843139171600342), (0.60924369096755981, -0.68235296010971069, 0.68235296010971069), (0.61344540119171143, -0.68235296010971069, 0.68235296010971069), (0.61764705181121826, -0.68627452850341797, 0.68627452850341797), (0.62184876203536987, -0.68627452850341797, 0.68627452850341797), (0.62605041265487671, -0.68627452850341797, 0.68627452850341797), (0.63025212287902832, -0.69019609689712524, 0.69019609689712524), (0.63445377349853516, -0.69019609689712524, 0.69019609689712524), (0.63865548372268677, -0.69411766529083252, 0.69411766529083252), (0.6428571343421936, -0.69411766529083252, 0.69411766529083252), (0.64705884456634521, -0.69803923368453979, 0.69803923368453979), (0.65126049518585205, -0.69803923368453979, 0.69803923368453979), (0.65546220541000366, -0.70196080207824707, 0.70196080207824707), (0.6596638560295105, -0.70196080207824707, 0.70196080207824707), (0.66386556625366211, -0.70196080207824707, 0.70196080207824707), (0.66806721687316895, -0.70588237047195435, 0.70588237047195435), (0.67226892709732056, -0.70588237047195435, 0.70588237047195435), (0.67647057771682739, -0.70980393886566162, 0.70980393886566162), (0.680672287940979, -0.70980393886566162, 0.70980393886566162), (0.68487393856048584, -0.7137255072593689, 0.7137255072593689), (0.68907564878463745, -0.7137255072593689, 0.7137255072593689), (0.69327729940414429, -0.71764707565307617, 0.71764707565307617), (0.6974790096282959, -0.71764707565307617, 0.71764707565307617), (0.70168066024780273, -0.7137255072593689, 0.7137255072593689), (0.70588237047195435, -0.70980393886566162, 0.70980393886566162), (0.71008402109146118, -0.70980393886566162, 0.70980393886566162), (0.71428573131561279, -0.70588237047195435, 0.70588237047195435), (0.71848738193511963, -0.70196080207824707, 0.70196080207824707), (0.72268909215927124, -0.69803923368453979, 0.69803923368453979), (0.72689074277877808, -0.69411766529083252, 0.69411766529083252), (0.73109245300292969, -0.69019609689712524, 0.69019609689712524), (0.73529410362243652, -0.68627452850341797, 0.68627452850341797), (0.73949581384658813, -0.68235296010971069, 0.68235296010971069), (0.74369746446609497, -0.67843139171600342, 0.67843139171600342), (0.74789917469024658, -0.67450982332229614, 0.67450982332229614), (0.75210082530975342, -0.67058825492858887, 0.67058825492858887), (0.75630253553390503, -0.66666668653488159, 0.66666668653488159), (0.76050418615341187, -0.66274511814117432, 0.66274511814117432), (0.76470589637756348, -0.65882354974746704, 0.65882354974746704), (0.76890754699707031, -0.65490198135375977, 0.65490198135375977), (0.77310925722122192, -0.65098041296005249, 0.65098041296005249), (0.77731090784072876, -0.64705884456634521, 0.64705884456634521), (0.78151261806488037, -0.64313727617263794, 0.64313727617263794), (0.78571426868438721, -0.63921570777893066, 0.63921570777893066), (0.78991597890853882, -0.63921570777893066, 0.63921570777893066), (0.79411762952804565, -0.64313727617263794, 0.64313727617263794), (0.79831933975219727, -0.64313727617263794, 0.64313727617263794), (0.8025209903717041, -0.64705884456634521, 0.64705884456634521), (0.80672270059585571, -0.64705884456634521, 0.64705884456634521), (0.81092435121536255, -0.65098041296005249, 0.65098041296005249), (0.81512606143951416, -0.65490198135375977, 0.65490198135375977), (0.819327712059021, -0.65490198135375977, 0.65490198135375977), (0.82352942228317261, -0.65882354974746704, 0.65882354974746704), (0.82773107290267944, -0.66274511814117432, 0.66274511814117432), (0.83193278312683105, -0.66666668653488159, 0.66666668653488159), (0.83613443374633789, -0.67058825492858887, 0.67058825492858887), (0.8403361439704895, -0.67450982332229614, 0.67450982332229614), (0.84453779458999634, -0.67843139171600342, 0.67843139171600342), (0.84873950481414795, -0.68235296010971069, 0.68235296010971069), (0.85294115543365479, -0.68627452850341797, 0.68627452850341797), (0.8571428656578064, -0.69019609689712524, 0.69019609689712524), (0.86134451627731323, -0.69411766529083252, 0.69411766529083252), (0.86554622650146484, -0.69803923368453979, 0.69803923368453979), (0.86974787712097168, -0.70196080207824707, 0.70196080207824707), (0.87394958734512329, -0.70980393886566162, 0.70980393886566162), (0.87815123796463013, -0.7137255072593689, 0.7137255072593689), (0.88235294818878174, -0.72156864404678345, 0.72156864404678345), (0.88655459880828857, -0.72549021244049072, 0.72549021244049072), (0.89075630903244019, -0.73333334922790527, 0.73333334922790527), (0.89495795965194702, -0.73725491762161255, 0.73725491762161255), (0.89915966987609863, -0.7450980544090271, 0.7450980544090271), (0.90336132049560547, -0.75294119119644165, 0.75294119119644165), (0.90756303071975708, -0.7607843279838562, 0.7607843279838562), (0.91176468133926392, -0.76862746477127075, 0.76862746477127075), (0.91596639156341553, -0.7764706015586853, 0.7764706015586853), (0.92016804218292236, -0.78431373834609985, 0.78431373834609985), (0.92436975240707397, -0.7921568751335144, 0.7921568751335144), (0.92857140302658081, -0.80000001192092896, 0.80000001192092896), (0.93277311325073242, -0.80784314870834351, 0.80784314870834351), (0.93697476387023926, -0.81568628549575806, 0.81568628549575806), (0.94117647409439087, -0.82745099067687988, 0.82745099067687988), (0.94537812471389771, -0.83529412746429443, 0.83529412746429443), (0.94957983493804932, -0.84313726425170898, 0.84313726425170898), (0.95378148555755615, -0.85490196943283081, 0.85490196943283081), (0.95798319578170776, -0.86666667461395264, 0.86666667461395264), (0.9621848464012146, -0.87450981140136719, 0.87450981140136719), (0.96638655662536621, -0.88627451658248901, 0.88627451658248901), (0.97058820724487305, -0.89803922176361084, 0.89803922176361084), (0.97478991746902466, -0.90980392694473267, 0.90980392694473267), (0.97899156808853149, -0.92156863212585449, 0.92156863212585449), (0.98319327831268311, -0.93333333730697632, 0.93333333730697632), (0.98739492893218994, -0.94509804248809814, 0.94509804248809814), (0.99159663915634155, -0.95686274766921997, 0.95686274766921997), (0.99579828977584839, -0.97254902124404907, 0.97254902124404907), (1.0, 0.9843137264251709, -0.9843137264251709)], 'red': [(0.0, 0.0, 0.0), (0.0042016808874905109, -0.0, 0.0), (0.0084033617749810219, 0.0, 0.0), (0.012605042196810246, 0.0, -0.0), (0.016806723549962044, 0.0, 0.0), (0.021008403971791267, 0.0, 0.0), -(0.025210084393620491, 0.0, 0.0), (0.029411764815449715, 0.0, 0.0), -(0.033613447099924088, 0.0, 0.0), (0.037815127521753311, -0.0039215688593685627, 0.0039215688593685627), (0.042016807943582535, -0.0078431377187371254, 0.0078431377187371254), (0.046218488365411758, -0.0078431377187371254, 0.0078431377187371254), (0.050420168787240982, -0.011764706112444401, 0.011764706112444401), (0.054621849209070206, -0.015686275437474251, 0.015686275437474251), (0.058823529630899429, -0.019607843831181526, 0.019607843831181526), (0.063025213778018951, -0.019607843831181526, 0.019607843831181526), (0.067226894199848175, -0.023529412224888802, 0.023529412224888802), (0.071428574621677399, -0.027450980618596077, 0.027450980618596077), (0.075630255043506622, -0.031372550874948502, 0.031372550874948502), (0.079831935465335846, -0.031372550874948502, 0.031372550874948502), (0.08403361588716507, -0.035294119268655777, 0.035294119268655777), (0.088235296308994293, -0.039215687662363052, 0.039215687662363052), (0.092436976730823517, -0.043137256056070328, 0.043137256056070328), (0.09663865715265274, -0.043137256056070328, 0.043137256056070328), (0.10084033757448196, -0.047058824449777603, 0.047058824449777603), (0.10504201799631119, -0.050980392843484879, 0.050980392843484879), (0.10924369841814041, -0.054901961237192154, 0.054901961237192154), (0.11344537883996964, -0.058823529630899429, 0.058823529630899429), (0.11764705926179886, -0.058823529630899429, 0.058823529630899429), (0.12184873968362808, -0.062745101749897003, 0.062745101749897003), (0.1260504275560379, -0.066666670143604279, 0.066666670143604279), (0.13025210797786713, -0.070588238537311554, 0.070588238537311554), (0.13445378839969635, -0.070588238537311554, 0.070588238537311554), (0.13865546882152557, -0.074509806931018829, 0.074509806931018829), (0.1428571492433548, -0.078431375324726105, 0.078431375324726105), (0.14705882966518402, -0.08235294371843338, 0.08235294371843338), (0.15126051008701324, -0.086274512112140656, 0.086274512112140656), (0.15546219050884247, -0.086274512112140656, 0.086274512112140656), (0.15966387093067169, -0.090196080505847931, 0.090196080505847931), (0.16386555135250092, -0.094117648899555206, 0.094117648899555206), (0.16806723177433014, -0.098039217293262482, 0.098039217293262482), (0.17226891219615936, -0.10196078568696976, 0.10196078568696976), (0.17647059261798859, -0.10196078568696976, 0.10196078568696976), (0.18067227303981781, -0.10588235408067703, 0.10588235408067703), (0.18487395346164703, -0.10980392247438431, 0.10980392247438431), (0.18907563388347626, -0.11372549086809158, 0.11372549086809158), (0.19327731430530548, -0.11764705926179886, 0.11764705926179886), (0.1974789947271347, -0.12156862765550613, 0.12156862765550613), (0.20168067514896393, -0.12156862765550613, 0.12156862765550613), (0.20588235557079315, -0.12549020349979401, 0.12549020349979401), (0.21008403599262238, -0.12941177189350128, 0.12941177189350128), (0.2142857164144516, -0.13333334028720856, 0.13333334028720856), (0.21848739683628082, -0.13725490868091583, 0.13725490868091583), (0.22268907725811005, -0.14117647707462311, 0.14117647707462311), (0.22689075767993927, -0.14117647707462311, 0.14117647707462311), (0.23109243810176849, -0.14509804546833038, 0.14509804546833038), (0.23529411852359772, -0.14901961386203766, 0.14901961386203766), (0.23949579894542694, -0.15294118225574493, 0.15294118225574493), (0.24369747936725616, -0.15686275064945221, 0.15686275064945221), (0.24789915978908539, -0.16078431904315948, 0.16078431904315948), (0.25210085511207581, -0.16078431904315948, 0.16078431904315948), (0.25630253553390503, -0.16470588743686676, 0.16470588743686676), (0.26050421595573425, -0.16862745583057404, 0.16862745583057404), (0.26470589637756348, -0.17254902422428131, 0.17254902422428131), (0.2689075767993927, -0.17647059261798859, 0.17647059261798859), (0.27310925722122192, -0.18039216101169586, 0.18039216101169586), (0.27731093764305115, -0.18431372940540314, 0.18431372940540314), (0.28151261806488037, -0.18823529779911041, 0.18823529779911041), (0.28571429848670959, -0.18823529779911041, 0.18823529779911041), (0.28991597890853882, -0.18823529779911041, 0.18823529779911041), (0.29411765933036804, -0.19215686619281769, 0.19215686619281769), (0.29831933975219727, -0.19215686619281769, 0.19215686619281769), (0.30252102017402649, -0.19607843458652496, 0.19607843458652496), (0.30672270059585571, -0.19607843458652496, 0.19607843458652496), (0.31092438101768494, -0.20000000298023224, 0.20000000298023224), (0.31512606143951416, -0.20000000298023224, 0.20000000298023224), (0.31932774186134338, -0.20392157137393951, 0.20392157137393951), (0.32352942228317261, -0.20392157137393951, 0.20392157137393951), (0.32773110270500183, -0.20784313976764679, 0.20784313976764679), (0.33193278312683105, -0.20784313976764679, 0.20784313976764679), (0.33613446354866028, -0.21176470816135406, 0.21176470816135406), (0.3403361439704895, -0.21176470816135406, 0.21176470816135406), (0.34453782439231873, -0.21568627655506134, 0.21568627655506134), (0.34873950481414795, -0.21568627655506134, 0.21568627655506134), (0.35294118523597717, -0.21960784494876862, 0.21960784494876862), (0.3571428656578064, -0.21960784494876862, 0.21960784494876862), (0.36134454607963562, -0.22352941334247589, 0.22352941334247589), (0.36554622650146484, -0.22352941334247589, 0.22352941334247589), (0.36974790692329407, -0.22745098173618317, 0.22745098173618317), (0.37394958734512329, -0.22745098173618317, 0.22745098173618317), (0.37815126776695251, -0.23137255012989044, 0.23137255012989044), (0.38235294818878174, -0.23137255012989044, 0.23137255012989044), (0.38655462861061096, -0.23529411852359772, 0.23529411852359772), (0.39075630903244019, -0.23921568691730499, 0.23921568691730499), (0.39495798945426941, -0.23921568691730499, 0.23921568691730499), (0.39915966987609863, -0.24313725531101227, 0.24313725531101227), (0.40336135029792786, -0.24313725531101227, 0.24313725531101227), (0.40756303071975708, -0.24705882370471954, 0.24705882370471954), (0.4117647111415863, -0.24705882370471954, 0.24705882370471954), (0.41596639156341553, -0.25098040699958801, 0.25098040699958801), (0.42016807198524475, -0.25098040699958801, 0.25098040699958801), (0.42436975240707397, -0.25490197539329529, 0.25490197539329529), (0.4285714328289032, -0.25490197539329529, 0.25490197539329529), (0.43277311325073242, -0.25882354378700256, 0.25882354378700256), (0.43697479367256165, -0.26274511218070984, 0.26274511218070984), (0.44117647409439087, -0.26274511218070984, 0.26274511218070984), (0.44537815451622009, -0.26666668057441711, 0.26666668057441711), (0.44957983493804932, -0.26666668057441711, 0.26666668057441711), (0.45378151535987854, -0.27058824896812439, 0.27058824896812439), (0.45798319578170776, -0.27058824896812439, 0.27058824896812439), (0.46218487620353699, -0.27450981736183167, 0.27450981736183167), (0.46638655662536621, -0.27843138575553894, 0.27843138575553894), (0.47058823704719543, -0.28627452254295349, 0.28627452254295349), (0.47478991746902466, -0.29803922772407532, 0.29803922772407532), (0.47899159789085388, -0.30588236451148987, 0.30588236451148987), (0.48319327831268311, -0.31764706969261169, 0.31764706969261169), (0.48739495873451233, -0.32549020648002625, 0.32549020648002625), (0.49159663915634155, -0.33725491166114807, 0.33725491166114807), (0.49579831957817078, -0.34509804844856262, 0.34509804844856262), (0.5, 0.35686275362968445, -0.35686275362968445), (0.50420171022415161, 0.36862745881080627, -0.36862745881080627), (0.50840336084365845, 0.37647059559822083, -0.37647059559822083), (0.51260507106781006, 0.38823530077934265, -0.38823530077934265), (0.51680672168731689, 0.3960784375667572, -0.3960784375667572), (0.52100843191146851, 0.40784314274787903, -0.40784314274787903), (0.52521008253097534, 0.41568627953529358, -0.41568627953529358), (0.52941179275512695, 0.42745098471641541, -0.42745098471641541), (0.53361344337463379, 0.43529412150382996, -0.43529412150382996), (0.5378151535987854, 0.44705882668495178, -0.44705882668495178), (0.54201680421829224, 0.45882353186607361, -0.45882353186607361), (0.54621851444244385, 0.46666666865348816, -0.46666666865348816), (0.55042016506195068, 0.47450980544090271, -0.47450980544090271), (0.55462187528610229, 0.47843137383460999, -0.47843137383460999), (0.55882352590560913, 0.48627451062202454, -0.48627451062202454), (0.56302523612976074, 0.49411764740943909, -0.49411764740943909), (0.56722688674926758, 0.50196081399917603, -0.50196081399917603), (0.57142859697341919, 0.5058823823928833, -0.5058823823928833), (0.57563024759292603, 0.51372551918029785, -0.51372551918029785), (0.57983195781707764, 0.5215686559677124, -0.5215686559677124), (0.58403360843658447, 0.52941179275512695, -0.52941179275512695), (0.58823531866073608, 0.53333336114883423, -0.53333336114883423), (0.59243696928024292, 0.54117649793624878, -0.54117649793624878), (0.59663867950439453, 0.54901963472366333, -0.54901963472366333), (0.60084033012390137, 0.55294120311737061, -0.55294120311737061), (0.60504204034805298, 0.56078433990478516, -0.56078433990478516), (0.60924369096755981, 0.56862747669219971, -0.56862747669219971), (0.61344540119171143, 0.57647061347961426, -0.57647061347961426), (0.61764705181121826, 0.58431375026702881, -0.58431375026702881), (0.62184876203536987, 0.58823531866073608, -0.58823531866073608), (0.62605041265487671, 0.59607845544815063, -0.59607845544815063), (0.63025212287902832, 0.60392159223556519, -0.60392159223556519), (0.63445377349853516, 0.61176472902297974, -0.61176472902297974), (0.63865548372268677, 0.61568629741668701, -0.61568629741668701), (0.6428571343421936, 0.62352943420410156, -0.62352943420410156), (0.64705884456634521, 0.63137257099151611, -0.63137257099151611), (0.65126049518585205, 0.63921570777893066, -0.63921570777893066), (0.65546220541000366, 0.64705884456634521, -0.64705884456634521), (0.6596638560295105, 0.65098041296005249, -0.65098041296005249), (0.66386556625366211, 0.65882354974746704, -0.65882354974746704), (0.66806721687316895, 0.66666668653488159, -0.66666668653488159), (0.67226892709732056, 0.67450982332229614, -0.67450982332229614), (0.67647057771682739, 0.68235296010971069, -0.68235296010971069), (0.680672287940979, 0.68627452850341797, -0.68627452850341797), (0.68487393856048584, 0.69411766529083252, -0.69411766529083252), (0.68907564878463745, 0.70196080207824707, -0.70196080207824707), (0.69327729940414429, 0.70980393886566162, -0.70980393886566162), (0.6974790096282959, 0.71764707565307617, -0.71764707565307617), (0.70168066024780273, 0.71764707565307617, -0.... [truncated message content] |