728x90 반응형 Axis2 [Python] matplotlib : Axis Scale and Ticks 각 Axes객체는 2개 이상의 Axis 객체를 가짐 (2D chart일 경우, x-axis와 y-axis를 가지므로 2개임). Axis는 주로 축의 scale과 tick locator, tick formatter를 제어한다. Scales 많이 사용되는 scale은 다음과 같음 'linear' : linear scale로 숫자 그대로임. 'log' : log scale로 작은 수에서는 간격이 크나, 큰 수로 갈수록 간격이 줄어듬. import numpy as np import matplotlib.pyplot as plt data1 = np.random.randn(100) fig, axs = plt.subplots(1, 2, figsize=(5, 2.7), layout='constrained') xdata .. 2023. 7. 14. [matplotlib] 계층구조 및 Container : Figure, Axes, Axis matplotlib의 계층구조matplotlib는 다음과 같은 hierarchical structure를 가지고 있음.일반적으로 Figure는 하나 이상의 Axes를 가지며(포함하며), Axes는 일반적으로 2개의 Axis 를 포함(2D image인 경우)함.(Axis들은 Tick을 포함)matplotlib에서 그려지는 모든 object는 Artist 임.Figure, Axes, Axis 는 모두 Artist 이면서 container 임.하나의 그래프(or chart)에는 하나의 figure만이 존재함.다음 그림은 이들의 hierarchical structure와 해당 구조의 Artist들(or container들)이 실제 그래프에서 어디에 속하는지를 보여줌.다음 예제 code는각 계층에 속하는 obje.. 2023. 7. 14. 이전 1 다음 728x90 반응형