728x90 반응형 line2 [matplotlib] line 및 marker 설정하기. 기본적으로 graph에서 사용되는 line 및 marker의 스타일 (유형, 굵기, 색, 마커)을 변경하는 것은Axes에서 제공하는 다양한 graph를 그리는 모든 메서드들에서 필요하기 때문에 공통적인 parameters가 제공됨. 다음이 많이 사용되는 것들을 정리해 놓은 것임.parameterdesc.valuelinestylels로도 쓰이며, 선의 종류.'-' : solid(실선), ':' : dotted(점선), '--' : dashed(파선), '-.' : dashdot(파점선)linewidthlw로도 쓰이며, 선의 굵기를 지정floatcolor선의 색'w' : white 'r' : red 'g' : green 'b' : blue 'y' : yellow 'c' : cyan 'm' : magenta.. 2023. 7. 21. [Python] 특정 점에서 직선에 수선의 발 구하기. 특정 pnt에서 두 점 segment_s(s), segment_e(e)로 정의된 line segment를 포함하는 line으로 수선의 발(foot of perpendicular line)를 내리는 경우는 다음과 같음. 위 그림에서 x가 바로 foot of perpendicular line임. 다음은 foot of perpendicular line (intersection)과 line-segment 중에서 pnt와 가장 가까운 점 (closet_pnt)을 반환하는 function을 구현한 예제임. def find_intersection_pnt( segment_s, segment_e, pnt): # Calculate the direction vector of the line segment defined by.. 2023. 7. 11. 이전 1 다음 728x90 반응형