traj#
- cfplot.traj(f=None, title=None, ptype=0, linestyle='-', linewidth=1.0, linecolor='b', marker='o', markevery=1, markersize=5.0, markerfacecolor='r', markeredgecolor='g', markeredgewidth=1.0, latmax=None, latmin=None, axes=True, xaxis=True, yaxis=True, verbose=None, legend=False, legend_lines=False, xlabel=None, ylabel=None, xticks=None, yticks=None, xticklabels=None, yticklabels=None, colorbar=None, colorbar_position=None, colorbar_orientation='horizontal', colorbar_title=None, colorbar_text_up_down=False, colorbar_text_down_up=False, colorbar_drawedges=True, colorbar_fraction=None, colorbar_thick=None, colorbar_anchor=None, colorbar_shrink=None, colorbar_labels=None, vector=False, head_width=0.4, head_length=1.0, fc='k', ec='k', zorder=None)[source]#
Create a trajectory plot for (discrete sampling) geometries.
The minimum usage is
traj(f), where f is a CF field.- Parameter breakdown (see below for full detail). The following parameters:
- specify the input CF data:
f
- configure trajectory line and marker appearance:
linestyle,linecolor,linewidth,marker,markersize,markerfacecolor,markeredgecolor
- control marker colouring and plotting order:
legend,zorder,verbose
- override the defaults derived from CF data:
title,axes,xaxis,yaxis,xlabel,ylabel,xticks,xticklabels,yticks,yticklabels
- configure the colourbar:
colorbar,colorbar_position,colorbar_orientation,colorbar_title,colorbar_text_up_down,colorbar_text_down_up,colorbar_drawedges,colorbar_fraction,colorbar_thick,colorbar_anchor,colorbar_shrink,colorbar_labels
- configure vector plotting:
vector,head_width,head_length,fc,ec
- Parameters:
f -- CF data used to make a trajectory plot.
linestyle -- Line style. Defaults to
'-'.linecolor -- Line colour. Defaults to
'b'.linewidth -- Line width. Defaults to
1.0.marker -- Marker style for points along the line. Defaults to
'o'.markersize -- Marker size. Defaults to
30.markerfacecolor -- Colour of the marker face. Defaults to
'b'.markeredgecolor -- Colour of the marker edge. Defaults to
'g'.legend -- If
True, plot markers in different colours according to a set of user-defined levels. Defaults toFalse.zorder -- Plotting order. Defaults to
None.verbose -- Set to
Trueto display a verbose listing of the operations performed bytraj. Defaults toNone.defaults (The following parameters override the corresponding)
data (derived from CF)
title -- Plot title. Defaults to
None.axes -- If
True, display the x- and y-axes.xaxis -- If
True, display the x-axis.yaxis -- If
True, display the y-axis.xlabel -- x-axis label. Defaults to
None.ylabel -- y-axis label. Defaults to
None.xticks -- x-axis tick positions. Defaults to
None.xticklabels -- x-axis tick labels. Defaults to
None.yticks -- y-axis tick positions. Defaults to
None.yticklabels -- y-axis tick labels. Defaults to
None.colorbar -- If not
None, controls whether a colour bar is plotted.colorbar_position -- Colour bar position as
[xmin, ymin, x_extent, y_extent]in normalised coordinates. Use this to position a common colour bar across multiple plots. For example,[0.1, 0.05, 0.8, 0.02].colorbar_orientation -- Colour bar orientation.
colorbar_title -- Colour bar title.
colorbar_text_up_down -- If
True, alternate horizontal colour bar labels above and below the colour bar, starting above.colorbar_text_down_up -- If
True, alternate horizontal colour bar labels below and above the colour bar, starting below.colorbar_drawedges -- If
True, draw internal dividing lines in the colour bar. Defaults toTrue.colorbar_fraction -- Fraction of the plot area allocated to the colour bar. Defaults to
0.21in normalised coordinates.colorbar_thick -- Colour bar thickness. Defaults to
0.015in normalised coordinates.colorbar_anchor -- Anchor point of the colour bar within the fraction space. Defaults to
0.5;0.0places it closer to the plot and1.0places it further away.colorbar_shrink -- Factor by which to shrink the colour bar. If the colour bar exceeds the plot area, values such as
1.0,0.55, or0.5may help it fit.colorbar_labels -- Labels for the colour bar. Defaults to the levels defined using
cfp.levs.plotting (The following parameters control vector)
vector -- If
True, draw vectors. Defaults toFalse.head_width -- Width of the vector arrowheads. Defaults to
2.0.head_length -- Length of the vector arrowheads. Defaults to
2.0.fc -- Vector face colour. Defaults to
'k'.ec -- Vector edge colour. Defaults to
'k'.
- Returns:
None.