Graphs

pyfdm.graphs.multiple_tfn_plot.multiple_tfn_plot(data, title=None, ax=None)[source]

Visualize multiple Triangular Fuzzy Numbers (TFNs) on a single plot.

Parameters: - data (list): A list of lists, where each inner list represents the parameters (a, b, c) of a TFN. - title (str, optional): The title of the plot. If not provided, the default title is ‘Triangular Fuzzy Numbers’. - ax (Axes or None): Axes object to draw on. If None, then current axes is used.

Example: ` # Example Usage: data = [[2, 3, 6], [3, 5, 7], [6, 8, 9]] multiple_tfn_plot(data, title='Example TFN Plot') `

The data parameter should be a list of lists, where each inner list contains three values representing the parameters (a, b, c) of a Triangular Fuzzy Number (TFN). The function generates a plot with the TFNs, labeling each curve with ‘TFN i’ (where i is the index of the TFN in the input data). The areas under the curves are filled with light gray for better visualization.

The title of the plot can be specified using the optional title parameter. If no title is provided, the default title is ‘Triangular Fuzzy Numbers’.

The function uses Matplotlib for plotting, and the resulting plot is displayed.

pyfdm.graphs.s_norm_tfn_plot.s_norm_tfn_plot(data, title=None, ax=None)[source]

Visualize the S-Norm operation on a set of Triangular Fuzzy Numbers (TFNs).

Parameters: - data (list): A list of lists, where each inner list represents the parameters (a, b, c) of a TFN. - title (str, optional): The title of the plot. If not provided, the default title is ‘S-norm Operation’. - ax (Axes or None): Axes object to draw on. If None, then current axes is used.

Example: ` # Example Usage: data = [[2, 3, 6], [3, 5, 7], [6, 8, 9]] s_norm_tfn_plot(data, title='S-Norm Visualization') `

This function generates a plot illustrating the S-Norm operation on a set of Triangular Fuzzy Numbers (TFNs). The TFNs are defined by parameters a, b, and c, provided in the input data. Each individual TFN is plotted, and the result of the S-Norm operation is visualized with a dashed line labeled ‘S-norm’. The vertical dashed lines represent the TFN parameters (a, b, c).

The title of the plot can be specified using the optional title parameter. If no title is provided, the default title is ‘S-norm Operation’.

The function uses Matplotlib for plotting, and the resulting plot is displayed.

pyfdm.graphs.single_tfn_plot.single_tfn_plot(a, b, c, title=None, ax=None)[source]

Visualize a single Triangular Fuzzy Number (TFN) on a plot.

Parameters: - a (float): The leftmost point of the triangular fuzzy number. - b (float): The peak or center point of the triangular fuzzy number. - c (float): The rightmost point of the triangular fuzzy number. - title (str, optional): The title of the plot. If not provided, the default title is ‘Triangular Fuzzy Number’. - ax (Axes or None): Axes object to draw on. If None, then current axes is used.

Example: ` # Example Usage: single_tfn_plot(2, 4, 6, title='Example Single TFN Plot') `

The a, b, and c parameters represent the leftmost, peak, and rightmost points of the Triangular Fuzzy Number (TFN). The function generates a plot with the TFN’s membership function, filling the area under the curve with light gray for better visualization. Vertical dashed lines are added to indicate the TFN’s parameters (a, b, c).

The title of the plot can be specified using the optional title parameter. If no title is provided, the default title is ‘Triangular Fuzzy Number’.

The function uses Matplotlib for plotting, and the resulting plot is displayed.

pyfdm.graphs.t_norm_tfn_plot.t_norm_tfn_plot(data, title=None, ax=None)[source]

Visualize the T-Norm operation on a set of Triangular Fuzzy Numbers (TFNs).

Parameters: - data (list): A list of lists, where each inner list represents the parameters (a, b, c) of a TFN. - title (str, optional): The title of the plot. If not provided, the default title is ‘S-norm Operation’. - ax (Axes or None): Axes object to draw on. If None, then current axes is used.

Example: ` # Example Usage: data = [[2, 3, 6], [3, 5, 7], [6, 8, 9]] t_norm_tfn_plot(data, title='T-Norm Visualization') `

This function generates a plot illustrating the S-Norm operation on a set of Triangular Fuzzy Numbers (TFNs). The TFNs are defined by parameters a, b, and c, provided in the input data. Each individual TFN is plotted, and the result of the S-Norm operation is visualized with a dashed line labeled ‘S-norm’. The vertical dashed lines represent the TFN parameters (a, b, c).

The title of the plot can be specified using the optional title parameter. If no title is provided, the default title is ‘S-norm Operation’.

The function uses Matplotlib for plotting, and the resulting plot is displayed.

pyfdm.graphs.tfn_criteria_plot.tfn_criteria_plot(criteria, ax=None)[source]

Visualize Triangular Fuzzy Number (TFN) criteria weights on subplots.

Parameters: - criteria (list): A list of lists, where each inner list represents the parameters (a, b, c) of a TFN criteria weight. - ax (Axes or None): Axes object to draw on. If None, then current axes is used.

Example: ` # Example Usage: criteria = [[0.2, 0.5, 0.8], [0.4, 0.7, 1.0], [0.1, 0.3, 0.6]] tfn_criteria_plot(criteria) `

The criteria parameter should be a list of lists, where each inner list contains three values representing the parameters (a, b, c) of a Triangular Fuzzy Number (TFN) criteria weight. The function generates subplots for each criteria weight, labeling them with ‘Criteria C_i Weight’ (where i is the index of the criteria weight in the input data).

The number of rows and columns for subplots are determined based on the number of criteria weights. The maximum number of rows is set to 4, and additional columns are added if there are more weights.

The function uses Matplotlib for plotting, and the resulting plot is displayed.

pyfdm.graphs.tfn_membership_plot.tfn_membership_plot(a, b, c, x, title=None, ax=None)[source]

Visualize the membership function of a Triangular Fuzzy Number (TFN) at a specified x value.

Parameters: - a (float): The leftmost point of the triangular fuzzy number. - b (float): The peak or center point of the triangular fuzzy number. - c (float): The rightmost point of the triangular fuzzy number. - x (float): The specific x value at which to highlight the membership function. - title (str, optional): The title of the plot. If not provided, the default title is ‘Membership of TFN’. - ax (Axes or None): Axes object to draw on. If None, then current axes is used.

Example: ` # Example Usage: tfn_membership_plot(2, 4, 6, 3.5, title='Membership Visualization') `

This function generates a plot illustrating the membership function of a Triangular Fuzzy Number (TFN) defined by parameters a, b, and c. The specified x value is marked with a circle on the plot, and its corresponding membership value is indicated by a dashed line. Vertical dashed lines represent the TFN’s parameters (a, b, c).

The title of the plot can be specified using the optional title parameter. If no title is provided, the default title is ‘Membership of TFN’.

The function uses Matplotlib for plotting, and the resulting plot is displayed.