class vcs.taylor.Gtd(name, source='default')[source]

The Taylor Diagram graphics method (Gtd) is used to plot Taylor diagrams on a VCS Canvas. Taylor diagrams provide a way of graphically summarizing how closely a pattern matches observations.

defaultSkillFunction(s, R)[source]

Provides a default function for determining the skill with which a model predicts observations. This function may be used in the function parameter of drawSkill(), although it may be preferable to provide a custom function for determining skill, depending on the application.

  • s (float) – A float representing the standard deviation of a model.

  • R (float) – A float representing the correlation of a model.


The skill of a model, computed using this function.

Return type


drawSkill(canvas, values, function=None)[source]

Draw a skill score. Default skill score provided in defaultSkillFunction() from Karl taylor, see PCMDI report series 55 for more information on Taylor diagrams and skill .


The function parameter must be provided for drawSkill to work. The defaultSkillFunction() provided in this module can be used to provide a default skill score. Be aware that, as stated in PCMDI report series 55 section 5, it is not possible to define a single skill score that is appropriate for all models. It may be more suitable to create a custom function for determining the skill score of your model.

  • canvas (vcs.Canvas.Canvas) – A VCS Canvas object on which to draw the skill score.

  • values (list/tuple) – A list/tuple used to specify the levels of an isoline object.

  • function (function) – A function for determining the skill score of a model.

getArc(value, val1=0.0, val2=90.0, convert=True)[source]

Return coordinates to draw an arc from 0 to 90 degrees.


val1 and val2 can be used to limit the arc (in degrees).

  • value (float) – The radius of the arc to be calculated.

  • val1 (float) – Lower limit of the arc to compute.

  • val2 (float) – Upper limit of the arc to compute.

  • convert (bool) – Boolean flag indicating whether


The coordinates for the calculated arc.

Return type


plot(data, template='deftaylor', skill=None, bg=0, canvas=None)[source]

Plots an instance of a Taylor diagram on the provided VCS Canvas.

  • data

  • template (str/vcs.template.P) – A VCS template or a string name of a VCS template.

  • skill

  • bg (bool/int) – A boolean/integer flag indicating whether to plot this object in the background.

  • canvas (vcs.Canvas.Canvas) – A VCS Canvas object on which the diagram will be plotted.

script(script_filename, mode='a')[source]

Saves out a copy of the taylordiagram graphics method, in JSON or Python format to a designated file.


If the the filename has a ‘.py’ at the end, it will produce a Python script. If no extension is given, then by default a .json file containing a JSON serialization of the object’s data will be produced.


VCS Scripts Deprecated. SCR script files are no longer generated by this function.

>>> a=vcs.init()
>>> ex=a.gettaylordiagram()
>>> ex.script('filename.py') # append to 'filename.py'
>>> ex.script('filename','w') # make/overwrite 'filename.json'
  • script_filename (str) – Output name of the script file. If no extension is specified, a .json object is created.

  • mode (str) – Either ‘w’ for replace, or ‘a’ for append. Defaults to ‘a’, if not specified.

class vcs.taylor.TDMarker[source]



Make sure that we have the same amount of everything usage self.equalize() Also updates self.number