sajou.plot.markers_mpl module

This module contains an extension to the MarkerStyle class of Matplotlib.

It implements an additional set of markers which are used for the representation of different attributes of a structural analysis model.

In addition to the standard markers, the following are implemented:

marker description
‘ap’ arc with arrow (anti clock-wise)
‘an’ arc with arrow (clock-wise)
‘psx’ horizontal pinned support
‘psy’ vertical pinned support
‘rsx’ horizontal rolling support
‘rsy’ vertical rolling support
‘es’ encastrated support
‘rex’ ‘rolling_encastrated_x’,
‘rey’ ‘rolling_encastrated_y’,
‘rc’ ‘rotation_constrained’,

Examples

(Source code, png, hires.png, pdf)

../_images/markers.png
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example to show the new marker styles"""
import matplotlib.pyplot as plt
from sajou.plot.lines_mpl import Line2D

fig = plt.figure(figsize=(12, 3))
ax = fig.add_subplot(111)
markers = ['ap', 'an', 'psx', 'rsx', 'es', 'rex', 'rc']

for ix, mark in enumerate(markers):
    marker = Line2D([ix], [0], marker=mark, fillstyle='none', color='k')
    ax.add_line(marker)

ax.set_xlim(-1, len(markers))
ax.set_ylim(-1, 1)
plt.show()
class sajou.plot.markers_mpl.MarkerStyle(marker=None, fillstyle=None)

Bases: matplotlib.markers.MarkerStyle

Defines custom marker styles for Sajou

markers

list of known markes

fillstyles

list of known fillstyles

filled_markers

list of known filled markers.

Parameters:
  • marker (string or array_like, optional, default: None) – See the descriptions of possible markers in the module docstring.
  • fillstyle (string, optional, default: 'full') – ‘full’, ‘left”, ‘right’, ‘bottom’, ‘top’, ‘none’
markers = {'psx': 'pinned_support_x', 'rsy': 'rolling_support_y', 2: 'tickup', 3: 'tickdown', 'psy': 'pinned_support_y', 5: 'caretright', 0: 'tickleft', 1: 'tickright', 8: 'caretleftbase', 9: 'caretrightbase', 10: 'caretupbase', 11: 'caretdownbase', '+': 'plus', 'ap': 'arc_arrow_positive', 'rex': 'rolling_encastrated_x', 'H': 'hexagon2', 'd': 'thin_diamond', '': 'nothing', '1': 'tri_down', 6: 'caretup', 'o': 'circle', 7: 'caretdown', '3': 'tri_left', 'rey': 'rolling_encastrated_y', '|': 'vline', 'es': 'encastrated_support', 'None': 'nothing', 'x': 'x', 'h': 'hexagon1', '<': 'triangle_left', '.': 'point', 'an': 'arc_arrow_negative', 's': 'square', 'P': 'plus_filled', 'rc': 'rotation_constrained', ',': 'pixel', '^': 'triangle_up', ' ': 'nothing', '_': 'hline', '>': 'triangle_right', '2': 'tri_up', None: 'nothing', '4': 'tri_right', '*': 'star', 'p': 'pentagon', '8': 'octagon', 'v': 'triangle_down', 'D': 'diamond', 'X': 'x_filled', 'rsx': 'rolling_support_x', 4: 'caretleft'}
markers_custom = {'ap': 'arc_arrow_positive', 'psx': 'pinned_support_x', 'psy': 'pinned_support_y', 'an': 'arc_arrow_negative', 'rex': 'rolling_encastrated_x', 'es': 'encastrated_support', 'rsx': 'rolling_support_x', 'rsy': 'rolling_support_y', 'rey': 'rolling_encastrated_y', 'rc': 'rotation_constrained'}