본문 바로가기

Customization4

Python 그림 제목과 축 라벨의 글꼴 크기를 어떻게 설정하나요?, How do I set the figure title and axes labels font size? 질문 저는 이렇게 Matplotlib에서 그림을 만들고 있습니다: from matplotlib import pyplot as plt fig = plt.figure() plt.plot(data) fig.suptitle('test title') plt.xlabel('xlabel') plt.ylabel('ylabel') fig.savefig('test.jpg') 그림 제목과 축 레이블에 대한 글꼴 크기를 지정하고 싶습니다. 세 가지 모두 다른 글꼴 크기를 가져야 하므로 전역 글꼴 크기(mpl.rcParams['font.size']=x)를 설정하는 것은 원하는 대로 작동하지 않습니다. 그림 제목과 축 레이블에 대한 글꼴 크기를 개별적으로 설정하는 방법은 무엇인가요? 답변 텍스트를 다루는 함수들 (label, t.. 2023. 6. 27.
Python Matplotlib 그림에서 글꼴 크기를 변경하는 방법, How to change the font size on a matplotlib plot 질문 모든 요소 (ticks, labels, title)의 글꼴 크기를 matplotlib 플롯에서 변경하는 방법은 무엇인가요? tick label 크기를 변경하는 방법은 알고 있습니다. 다음과 같이 수행됩니다: import matplotlib matplotlib.rc('xtick', labelsize=20) matplotlib.rc('ytick', labelsize=20) 하지만 나머지는 어떻게 변경하나요? 답변 matplotlib documentation에 따르면, font = {'family' : 'normal', 'weight' : 'bold', 'size' : 22} matplotlib.rc('font', **font) 이렇게 하면 모든 항목의 글꼴이 kwargs 객체에서 지정한 글꼴로 설정됩니.. 2023. 6. 26.
Flutter 커스텀 카드 모양 플러터 SDK, Custom Card Shape Flutter SDK 질문 I have developed an app with GridView on Flutter. GridView items are Card and the default card shape is Rectangle with a radius of 4. I know there is shape property for Card Widget and it takes ShapeBorder class but I am unable to find how to use ShapeBorder class and customize my cards in GridView. How do I go about this? 답변 이렇게 사용할 수 있습니다. Card( shape: RoundedRectangleBorder( borderRadius: .. 2023. 5. 28.
Flutter 텍스트 필드의 높이와 너비를 변경하는 방법은 무엇인가요?, How to change TextField's height and width? 질문 TextField의 width와 height를 어떻게 사용자 정의할 수 있나요? 답변 너비를 조정하려면 다음과 같이 TextField를 SizedBox 위젯으로 래핑 할 수 있습니다: const SizedBox( width: 100.0, child: TextField(), ) TextField의 높이에 대해 정확히 무엇을 원하는지 모르겠지만, TextStyle 위젯을 살펴볼 수 있습니다. 이 위젯을 사용하면 fontSize 및/또는 height를 조작할 수 있습니다. const SizedBox( width: 100.0, child: TextField( style: TextStyle(fontSize: 40.0, height: 2.0, color: Colors.black), ), ) TextStyle의.. 2023. 5. 15.