A Python application for interactively plotting and visualizing various types of fuzzy sets using Matplotlib. It provides a terminal-based interface to select a fuzzy set "family" (e.g., Type-1, Type-2, Intuitionistic) and a base "shape" (e.g., Gaussian, Triangular), then launches an interactive plot with sliders to control all parameters.
- Multiple Fuzzy Families: Visualize classic (Type-1), Type-2, Intuitionistic, Pythagorean, Picture, Spherical, and Neutrosophic sets.
- Various Membership Functions: Supports Gaussian, triangular, trapezoidal, gbell, sigmoid, s-shape, z-shape, pi-shape, and more.
- Fully Interactive: All parameters for both the shape (e.g.,
center,sigma) and the family (e.g.,nu_scale,unc_umf) are controllable via Matplotlib sliders. - Dual View: Renders both a standard 2D plot and a 3D surface plot.
- Terminal UI: Clean, color-coded terminal menu for selecting the plotter and set type.
numpymatplotlibscipy
- Clone the repository:
git clone https://github.com/electr1fy0/grapho.git cd grapho - Install the dependencies:
# Create a virtual environment (optional but recommended) python -m venv venv # Activate it # On Windows: .\venv\Scripts\activate # On macOS/Linux: source venv/bin/activate # Install the required packages pip install numpy matplotlib scipy
Run the main Python script:
python main.py- Type-1: Standard fuzzy set with one membership function μ(x).
- Type-2: Interval Type-2 set defined by an Upper Membership Function (UMF) and a Lower Membership Function (LMF).
- Intuitionistic (IFS): Defined by membership μ(x) and non-membership ν(x), constrained by μ(x) + ν(x) ≤ 1.
- Pythagorean (PFS): Defined by μ(x) and ν(x), constrained by μ(x)² + ν(x)² ≤ 1.
- Picture (PFS): Defined by μ(x) (membership), η(x) (neutral), and ν(x) (non-membership), constrained by μ(x) + η(x) + ν(x) ≤ 1.
- Spherical (SFS): Defined by μ(x), η(x), and ν(x), constrained by μ(x)² + η(x)² + ν(x)² ≤ 1.
- Neutrosophic (SVNS): Single-Valued Neutrosophic Set defined by independent T(x) (truth), I(x) (indeterminacy), and F(x) (falsity) components, constrained by 0 ≤ T(x) + I(x) + F(x) ≤ 3.
gaussiantriangulartrapezoidalgbell(Generalized Bell)sigmoids(S-shape)z(Z-shape)pi(Pi-shape, composed of S and Z)exponentialpolynomial