Plot Module¶
Copyright (C) 2007-2017 Jonas Diemer, Philip Axer
TU Braunschweig, Germany
All rights reserved.
See LICENSE file for copyright and license details.
Authors: |
|
---|
Description¶
General purpose plotting functions: * event model plotting * gantt plotting (requires the simulation engine)
-
pycpa.plot.
augment_range
(plot_range)[source]¶ Adds points around every point in plot_range for accurately plotting integer-based curves
-
pycpa.plot.
plot_eta
(eta, plot_range, label=None, color=None, show=False, filename=None)[source]¶ Plot an eta function
-
pycpa.plot.
plot_event_model
(model, num_events, file_format=None, separate_plots=True, file_prefix='', ticks_at_steps=False)[source]¶ Plot the Task’s eta and delta_min functions. Intervals in eta are shown half-open, as defined in [Richter2005].
Parameters: - model (model.EventModel) – the event model
- num_events – Number of events to plot
- file_format (string) – the format of the file to be plotted
- separate_plots (bool) – whether eta and delta plots should be combined
- file_prefix (string) – prefix of file name of plots
- ticks_at_steps (bool) – If True, draw the x-axis ticks at steps of the functions. Otherwise, let matplotlib decide where to draw ticks.
Return type: None
-
pycpa.plot.
plot_gantt
(tasks, task_results, file_name=None, show=True, xlim=None, preemtion_bar_height=0.2, height=1, hdist=1, bar_linewidth=1, min_dist_arrows=0.2, plot_event_arrival=True, plot_activation_finishing=False, annotate_tasks=True, task=None, wcrt_voffset=0.5, annotation_offset=0.2, arrow_width=0.05, arrow_head_width=0.4, arrow_head_length=0.2, arrow_xscale=1, arrow_yoffset=0.1, xticks_only_on_changes=False, color_preemtion_bar='0.30', color_execution_bar='lightblue', title='Gantt', number_xticks=20)[source]¶ Plot a gantt chart of a given task list. Execution time information is taken from the task attribute q_exec_windows which is written by the simulation framework