![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdEFglo%2FbtrV47wnBhu%2Fil3LzPA2zfTffxa20m4S91%2Fimg.png)
Python 벤 다이어그램 그리기
2023. 1. 12. 18:34
프로그래밍 언어/Python
파이썬을 사용해서 벤 다이어그램을 그려봤다. 예제로 여러 집합을 그려봤는데 정리도 할겸 소스코드를 정리해봤다. 1. 라이브러리 설치 !pip install matplotlib-venn 2. 라이브러리 사용하기 import matplotlib.pyplot as plt from matplotlib_venn import venn2, venn2_circles 3. 벤 다이어그램 그리기 v = venn2(subsets={'10': 1, '01': 1, '11': 0.5}, set_labels = ('A', 'B')) c = venn2_circles(subsets=(1, 1, 0.5), linestyle='solid') v.get_patch_by_id('10').set_color('b') v.get_patch_by..