Plot the membership function of the fuzzy set.
(self)
| 157 | ) |
| 158 | |
| 159 | def plot(self): |
| 160 | """ |
| 161 | Plot the membership function of the fuzzy set. |
| 162 | """ |
| 163 | x = np.linspace(0, 1, 1000) |
| 164 | y = [self.membership(xi) for xi in x] |
| 165 | |
| 166 | plt.plot(x, y, label=self.name) |
| 167 | |
| 168 | |
| 169 | if __name__ == "__main__": |
no test coverage detected