Use one of the build-in plots included in tikzpy object (plots object)

Load main tikzpy class as follow and add a new plot:

 1import tikzpy
 2
 3### Load main object
 4tikZ = tikzpy.pytikz()
 5
 6### Add point at x=0, y=0, z=0
 7p0 = tikZ.pto.pto(0,0,0)
 8
 9### Add point at x=1, y=1, z=1
10p1 = tikZ.pto.pto(1,1,1)
11
12### Assembly type racime
13rac = tik.asse.racime(group = 0)
14rac.l1 = 10.             #Add length 1 value
15rac.l2 = 5.              #Add length 2 value
16rac.l3 = 1.              #Add length 3 value
17rac.origin = p0          #Add point
18rac.add_element("Example", thickness = None, separation = None)
19rac.move(p1-p0)          #Move assembly
20rac.addlabel="patatin"   #Add a label

and start bulding your drawing. See more plots examples.

Plots functions. Class -> tikzpy.plots

class cls_plots._plots(parent)[source]

Plots class:

Platform

Unix, Windows

Synopsis

buld-in plots based on tikzpy

Available plots
  • Racime

  • Vertical bars plots

Chracteristics of a plot object

  • Each plot object has different properties depending on the nature of the plot.

racime(group=0)[source]
Synopsis:
  • Returns a racime plot object

Args:
  • None

Optional parameters:
  • group = 0: group id

Returns:
  • A racime plot object

Usage

bars_vertical(group=0)[source]
Synopsis:
  • Returns a vertical bars plot object

Args:
  • None

Optional parameters:
  • group = 0: group id

Returns:
  • A vertical bars plot object

Usage

arrow_vertical(group=0)[source]
Synopsis:
  • Returns a vertical arrow plot object

Args:
  • None

Optional parameters:
  • group = 0: group id

Returns:
  • A vertical arrow plot object

Usage

Vertical bars plot

class plots.cls_bars_vertical._bars_vertical(parent)[source]

Vertical bars plot:

Creates a vertical bars plot.

Variables
  • p0 – initial point of the plot

  • sep_L – height of the bars

  • width – width of the longer bar

  • width – width of the longer bar

  • lst_title – shapes conform the title

  • title – text of the title

  • lbl_axis0 – label to use in the data buffer for bars values

  • lbl_label1 – label to use in the data buffer for bars text column 2

  • lbl_label2 – label to use in the data buffer for bars text column 3

  • lst_text2 – shapes conform the vertical text column 2

  • lst_text3 – shapes conform the vertical text column 3

  • lst_path0 – shapes conform the bars

  • shps – all the shapes that conform the plot

Functions

Usage

Vertical arrow plot

class plots.cls_arrow_vertical._arrow_vertical(parent)[source]

Vertical arrow plot:

Creates a vertical arrow plot showing a dependant thickness bases on lbl_axis0.

Variables
  • p0 – initial point of the plot

  • sep_L – height of the arrow

  • thick_scale – scale of the thikcness arrow

  • lst_title – shapes conform the title

  • title – text of the title

  • lbl_axis0 – label to use in the data buffer for arrow values

  • lbl_label1 – label to use in the data buffer for arrow text column 2

  • lst_text1 – shapes conform the vertical text column 2

  • lst_path0 – shapes conform the arrow

  • up-down – arrow up or down (True/False)

  • shps – all the shapes that conform the plot

Functions

Usage

class cls_plots._assembly(parent, key, type)[source]
load_data_buffer(data_buff)[source]
Synopsis:
  • Loads a data buffer file into the plot to be plot in case is required

Args:
  • data_buff object (see Data buffer class)

Optional parameters:
  • units = None (by default the tikzpy units will be use)

Returns:
  • None

Usage
draw_plot(units=None)[source]
Synopsis:
  • Draw / load the plot. The elements that compose the plot become accessible. Once is draw it can not be draw again.

Args:
  • None

Optional parameters:
  • units = None (by default the tikzpy units will be use)

Returns:
  • None

Usage