pyg.threed module

class pyg.threed.pyg3d(env=’plot’, colors=’purdue’)[source]

Bases: pyg.twod.pyg2d

A pyg.pyg3d object plots many three-dimensional data types.

The pyg3d class provides an access to matplotlib charting functions and some hook ins to making these functions easier to use and more repeatable. The constructor itself takes only one optional argument, env.

Parameters:env (plot, gui, or None) – The environement option defines where you are going to use the generated plot, with the default option being plot (or printing). If you are using this to generate plots for a gui, define this option as gui and the class will choose a prettier parameter set for your chart. Default: plot.
Returns:the pyg3d object.
Return type:pyg3d
add_data_pointer(x, y, z, string=None, place=’up-right’, axes=None)[source]
box(corner, d1, d2, d3, color=’gray’, planes=True, lines=False, axes=None)[source]
clabel(label, axes=None)[source]

pyg2d.xlabel adds a label to the x-axis.

pyg2d.xlabel adds a label to the x-axis of the current axes (or other axis given by kwarg axes).

Parameters:
  • label (str) – The label added to the x-axis of the defined axis. The label can take LaTeX arguments and the ah style guide asks for labels given as ‘Label ($variable$) [$unit$]’.
  • axes (axes, or None) – If not None, this argument will apply the x-label to the provided axis.
Returns:

None

colorbar()[source]
contour(x, y, z, name=’countour’, addto=None, **kwargs)[source]
cube(center, dx, dy, dz, color=’gray’, planes=True, lines=False, axes=None)[source]
cylinder(center, h, r, color, planes=True, lines=False, axes=None)[source]
leg_col_full_page = 4
leg_col_one_col = 2
leg_col_two_col = 3
legend()[source]
linestyle = {0: ‘-‘, 1: ‘–’, 2: ‘-.’, 3: ‘:’}
marker = {0: ‘+’, 1: ‘.’, 2: ‘1’, 3: ‘1’, 4: ‘2’, 5: ‘3’, 6: ‘4’}
orthogonal_proj(zfront, zback)[source]
sizestring = {‘1’: ‘onecolumn’, ‘fp’: ‘fullpage’, ‘none’: ”, ‘2’: ‘twocolumn’, ‘cs’: ‘customsize’}
sphere(center, r, color=’gray’, planes=True, lines=False, axes=None)[source]
surf(x, y, z, c=None, cmap=[<Color #746c66>, <Color #746c66>, <Color #756c66>, <Color #756c65>, <Color #766c65>, <Color #766c65>, <Color #766c65>, <Color #776c64>, <Color #776d64>, <Color #786d64>, <Color #786d64>, <Color #786d64>, <Color #796d63>, <Color #796d63>, <Color #7a6d63>, <Color #7a6d63>, <Color #7a6d62>, <Color #7b6d62>, <Color #7b6d62>, <Color #7c6d62>, <Color #7c6d61>, <Color #7c6e61>, <Color #7d6e61>, <Color #7d6e61>, <Color #7e6e61>, <Color #7e6e60>, <Color #7e6e60>, <Color #7f6e60>, <Color #7f6e60>, <Color #806e5f>, <Color #806e5f>, <Color #816f5f>, <Color #816f5f>, <Color #816f5e>, <Color #826f5e>, <Color #826f5e>, <Color #836f5e>, <Color #836f5e>, <Color #836f5d>, <Color #846f5d>, <Color #84705d>, <Color #85705d>, <Color #85705c>, <Color #86705c>, <Color #86705c>, <Color #86705c>, <Color #87705b>, <Color #87705b>, <Color #88715b>, <Color #88715b>, <Color #88715a>, <Color #89715a>, <Color #89715a>, <Color #8a715a>, <Color #8a7159>, <Color #8b7159>, <Color #8b7259>, <Color #8b7259>, <Color #8c7258>, <Color #8c7258>, <Color #8d7258>, <Color #8d7258>, <Color #8e7257>, <Color #8e7357>, <Color #8e7357>, <Color #8f7357>, <Color #8f7356>, <Color #907356>, <Color #907356>, <Color #917456>, <Color #917455>, <Color #917455>, <Color #927455>, <Color #927455>, <Color #937454>, <Color #937554>, <Color #947554>, <Color #947554>, <Color #947553>, <Color #957553>, <Color #957553>, <Color #967653>, <Color #967652>, <Color #977652>, <Color #977652>, <Color #987651>, <Color #987751>, <Color #987751>, <Color #997751>, <Color #997750>, <Color #9a7750>, <Color #9a7850>, <Color #9b7850>, <Color #9b784f>, <Color #9b784f>, <Color #9c784f>, <Color #9c794f>, <Color #9d794e>, <Color #9d794e>, <Color #9e794e>, <Color #9e794d>, <Color #9f7a4d>, <Color #9f7a4d>, <Color #9f7a4d>, <Color #a07a4c>, <Color #a07a4c>, <Color #a17b4c>, <Color #a17b4c>, <Color #a27b4b>, <Color #a27b4b>, <Color #a37c4b>, <Color #a37c4a>, <Color #a47c4a>, <Color #a47c4a>, <Color #a47d4a>, <Color #a57d49>, <Color #a57d49>, <Color #a67d49>, <Color #a67d49>, <Color #a77e48>, <Color #a77e48>, <Color #a87e48>, <Color #a87e47>, <Color #a97f47>, <Color #a97f47>, <Color #a97f47>, <Color #aa7f46>, <Color #aa8046>, <Color #ab8046>, <Color #ab8045>, <Color #ac8145>, <Color #ac8145>, <Color #ad8145>, <Color #ad8144>, <Color #ae8244>, <Color #ae8244>, <Color #af8243>, <Color #af8243>, <Color #af8343>, <Color #b08343>, <Color #b08342>, <Color #b18442>, <Color #b18442>, <Color #b28441>, <Color #b28441>, <Color #b38541>, <Color #b38541>, <Color #b48540>, <Color #b48640>, <Color #b58640>, <Color #b5863f>, <Color #b6863f>, <Color #b6873f>, <Color #b6873f>, <Color #b7873e>, <Color #b7883e>, <Color #b8883e>, <Color #b8883d>, <Color #b9893d>, <Color #b9893d>, <Color #ba893c>, <Color #ba8a3c>, <Color #bb8a3c>, <Color #bb8a3c>, <Color #bc8b3b>, <Color #bc8b3b>, <Color #bd8b3b>, <Color #bd8c3a>, <Color #be8c3a>, <Color #be8c3a>, <Color #bf8d39>, <Color #bf8d39>, <Color #c08d39>, <Color #c08e39>, <Color #c18e38>, <Color #c18e38>, <Color #c18f38>, <Color #c28f37>, <Color #c28f37>, <Color #c39037>, <Color #c39036>, <Color #c49036>, <Color #c49136>, <Color #c59135>, <Color #c59235>, <Color #c69235>, <Color #c69234>, <Color #c79334>, <Color #c79334>, <Color #c89334>, <Color #c89433>, <Color #c99433>, <Color #c99533>, <Color #ca9532>, <Color #ca9532>, <Color #cb9632>, <Color #cb9631>, <Color #cc9631>, <Color #cc9731>, <Color #cd9730>, <Color #cd9830>, <Color #ce9830>, <Color #ce982f>, <Color #cf992f>, <Color #cf992f>, <Color #d09a2e>, <Color #d09a2e>, <Color #d19a2e>, <Color #d19b2e>, <Color #d29b2d>, <Color #d29c2d>, <Color #d39c2d>, <Color #d39c2c>, <Color #d39d2c>, <Color #d49d2c>, <Color #d49e2c>, <Color #d49e2c>, <Color #d59e2b>, <Color #d59f2b>, <Color #d69f2b>, <Color #d6a02b>, <Color #d6a02b>, <Color #d7a02a>, <Color #d7a12a>, <Color #d7a12a>, <Color #d8a22a>, <Color #d8a22a>, <Color #d9a229>, <Color #d9a329>, <Color #d9a329>, <Color #daa429>, <Color #daa429>, <Color #dba428>, <Color #dba528>, <Color #dba528>, <Color #dca628>, <Color #dca628>, <Color #dca627>, <Color #dda727>, <Color #dda727>, <Color #dda827>, <Color #dea827>, <Color #dea826>, <Color #dfa926>, <Color #dfa926>, <Color #dfaa26>, <Color #e0aa26>, <Color #e0ab26>, <Color #e0ab25>, <Color #e1ab25>, <Color #e1ac25>, <Color #e2ac25>, <Color #e2ad25>, <Color #e2ad24>, <Color #e3ae24>, <Color #e3ae24>], addto=None, name=’surf’, **kwargs)[source]
surf2d(x, y, z, c, cmap=[<Color #746c66>, <Color #746c66>, <Color #756c66>, <Color #756c65>, <Color #766c65>, <Color #766c65>, <Color #766c65>, <Color #776c64>, <Color #776d64>, <Color #786d64>, <Color #786d64>, <Color #786d64>, <Color #796d63>, <Color #796d63>, <Color #7a6d63>, <Color #7a6d63>, <Color #7a6d62>, <Color #7b6d62>, <Color #7b6d62>, <Color #7c6d62>, <Color #7c6d61>, <Color #7c6e61>, <Color #7d6e61>, <Color #7d6e61>, <Color #7e6e61>, <Color #7e6e60>, <Color #7e6e60>, <Color #7f6e60>, <Color #7f6e60>, <Color #806e5f>, <Color #806e5f>, <Color #816f5f>, <Color #816f5f>, <Color #816f5e>, <Color #826f5e>, <Color #826f5e>, <Color #836f5e>, <Color #836f5e>, <Color #836f5d>, <Color #846f5d>, <Color #84705d>, <Color #85705d>, <Color #85705c>, <Color #86705c>, <Color #86705c>, <Color #86705c>, <Color #87705b>, <Color #87705b>, <Color #88715b>, <Color #88715b>, <Color #88715a>, <Color #89715a>, <Color #89715a>, <Color #8a715a>, <Color #8a7159>, <Color #8b7159>, <Color #8b7259>, <Color #8b7259>, <Color #8c7258>, <Color #8c7258>, <Color #8d7258>, <Color #8d7258>, <Color #8e7257>, <Color #8e7357>, <Color #8e7357>, <Color #8f7357>, <Color #8f7356>, <Color #907356>, <Color #907356>, <Color #917456>, <Color #917455>, <Color #917455>, <Color #927455>, <Color #927455>, <Color #937454>, <Color #937554>, <Color #947554>, <Color #947554>, <Color #947553>, <Color #957553>, <Color #957553>, <Color #967653>, <Color #967652>, <Color #977652>, <Color #977652>, <Color #987651>, <Color #987751>, <Color #987751>, <Color #997751>, <Color #997750>, <Color #9a7750>, <Color #9a7850>, <Color #9b7850>, <Color #9b784f>, <Color #9b784f>, <Color #9c784f>, <Color #9c794f>, <Color #9d794e>, <Color #9d794e>, <Color #9e794e>, <Color #9e794d>, <Color #9f7a4d>, <Color #9f7a4d>, <Color #9f7a4d>, <Color #a07a4c>, <Color #a07a4c>, <Color #a17b4c>, <Color #a17b4c>, <Color #a27b4b>, <Color #a27b4b>, <Color #a37c4b>, <Color #a37c4a>, <Color #a47c4a>, <Color #a47c4a>, <Color #a47d4a>, <Color #a57d49>, <Color #a57d49>, <Color #a67d49>, <Color #a67d49>, <Color #a77e48>, <Color #a77e48>, <Color #a87e48>, <Color #a87e47>, <Color #a97f47>, <Color #a97f47>, <Color #a97f47>, <Color #aa7f46>, <Color #aa8046>, <Color #ab8046>, <Color #ab8045>, <Color #ac8145>, <Color #ac8145>, <Color #ad8145>, <Color #ad8144>, <Color #ae8244>, <Color #ae8244>, <Color #af8243>, <Color #af8243>, <Color #af8343>, <Color #b08343>, <Color #b08342>, <Color #b18442>, <Color #b18442>, <Color #b28441>, <Color #b28441>, <Color #b38541>, <Color #b38541>, <Color #b48540>, <Color #b48640>, <Color #b58640>, <Color #b5863f>, <Color #b6863f>, <Color #b6873f>, <Color #b6873f>, <Color #b7873e>, <Color #b7883e>, <Color #b8883e>, <Color #b8883d>, <Color #b9893d>, <Color #b9893d>, <Color #ba893c>, <Color #ba8a3c>, <Color #bb8a3c>, <Color #bb8a3c>, <Color #bc8b3b>, <Color #bc8b3b>, <Color #bd8b3b>, <Color #bd8c3a>, <Color #be8c3a>, <Color #be8c3a>, <Color #bf8d39>, <Color #bf8d39>, <Color #c08d39>, <Color #c08e39>, <Color #c18e38>, <Color #c18e38>, <Color #c18f38>, <Color #c28f37>, <Color #c28f37>, <Color #c39037>, <Color #c39036>, <Color #c49036>, <Color #c49136>, <Color #c59135>, <Color #c59235>, <Color #c69235>, <Color #c69234>, <Color #c79334>, <Color #c79334>, <Color #c89334>, <Color #c89433>, <Color #c99433>, <Color #c99533>, <Color #ca9532>, <Color #ca9532>, <Color #cb9632>, <Color #cb9631>, <Color #cc9631>, <Color #cc9731>, <Color #cd9730>, <Color #cd9830>, <Color #ce9830>, <Color #ce982f>, <Color #cf992f>, <Color #cf992f>, <Color #d09a2e>, <Color #d09a2e>, <Color #d19a2e>, <Color #d19b2e>, <Color #d29b2d>, <Color #d29c2d>, <Color #d39c2d>, <Color #d39c2c>, <Color #d39d2c>, <Color #d49d2c>, <Color #d49e2c>, <Color #d49e2c>, <Color #d59e2b>, <Color #d59f2b>, <Color #d69f2b>, <Color #d6a02b>, <Color #d6a02b>, <Color #d7a02a>, <Color #d7a12a>, <Color #d7a12a>, <Color #d8a22a>, <Color #d8a22a>, <Color #d9a229>, <Color #d9a329>, <Color #d9a329>, <Color #daa429>, <Color #daa429>, <Color #dba428>, <Color #dba528>, <Color #dba528>, <Color #dca628>, <Color #dca628>, <Color #dca627>, <Color #dda727>, <Color #dda727>, <Color #dda827>, <Color #dea827>, <Color #dea826>, <Color #dfa926>, <Color #dfa926>, <Color #dfaa26>, <Color #e0aa26>, <Color #e0ab26>, <Color #e0ab25>, <Color #e1ab25>, <Color #e1ac25>, <Color #e2ac25>, <Color #e2ad25>, <Color #e2ad24>, <Color #e3ae24>, <Color #e3ae24>], addto=None, name=’plot’, **kwargs)[source]
update_data_pointers()[source]
upright_orthogonal_proj(zfront, zback)[source]
view(phi, theta, perspective=False, upright=False)[source]
zlabel(label, axes=None)[source]

pyg2d.xlabel adds a label to the x-axis.

pyg2d.xlabel adds a label to the x-axis of the current axes (or other axis given by kwarg axes).

Parameters:
  • label (str) – The label added to the x-axis of the defined axis. The label can take LaTeX arguments and the ah style guide asks for labels given as ‘Label ($variable$) [$unit$]’.
  • axes (axes, or None) – If not None, this argument will apply the x-label to the provided axis.
Returns:

None

zlim(minz, maxz, axes=None)[source]

pyg2d.ylim limits the view of the y-axis to limits.

Parameters:
  • miny (float) – The minimum value of y that will be shown.
  • maxy (float) – The maximum value of y that will be shown.
  • axes (axes, or None) – If not None, this argument will apply the y-limit to the provided axis.
Returns:

None