이 문서의 예에서는 Python으로 그래픽을 그리는 방법을 설명합니다. 참조를 위해 모든 사람과 공유하세요. 세부 사항은 다음과 같습니다.
1. 그래프에 데이터 레이블을 추가합니다.
plt.plot(datat.index,datat) plt.xlabel('index', fontsize=15) plt.legend(['t_bottom','t_top'],loc = 'upper_right',fontsize = 10) plt.show()
2. 레이블을 맨 오른쪽에 배치합니다.
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
# coding: UTF-8 import matplotlib.pyplot as plt plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签 plt.rcParams['axes.unicode_minus']=False #用来正常显示负号#有中文出现的情况,需要u'内容4. 히트 맵 그리기
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns d ={'1':[0.87,0.95],'2':[0.86,0.91],'3':[0.86,0.93],'4':[0.86,0.92],'5':[0.86,0.93]} df = pd.DataFrame(d,index = [2,1]) df ### annot是表示显示方块代表的数值出来 cmap颜色 sns.heatmap(df,annot = True,cmap="YlGnBu") plt.show()
import matplotlib.pyplot as plt import seaborn as sns color = sns.color_palette() sns.set_style('darkgrid') %matplotlib inline plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签 plt.rcParams['axes.unicode_minus']=False #用来正常显示负号#有中文出现的情况,需要u'内容' plt.figure(figsize=[9,6]) plt.plot(datat.index,datat_.t_bottom,color = 'r') plt.plot(datat.index,datat_.t_top,color = 'c') plt.scatter(datat.index,datat_.bottom,marker='.',c='g') plt.scatter(datat.index,datat_.top,marker='.',c='b') plt.legend(('t_bottom','t_top','noise_bottom','noise_top'),loc = 'upper right',fontsize=15) plt.xlabel('index', fontsize=15) plt.ylabel(u'温度', fontsize=15) #plt.legend(['t_bottom','t_top'],loc = 'upper_right',fontsize = 10) plt.show()
color =
character | color |
---|---|
<span class="pre">'b'<code class="docutils literal notranslate" style="font-family:Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;font-size:.95em;letter-spacing:.01em;"><span class="pre">'b'</span> |
blue |
<span class="pre">'g'</span> |
green |
<span class="pre">'r'</span> |
red |
<span class="pre">'c'</span> |
cyan |
<span class="pre">'m'</span> |
magenta |
<span class="pre">'y'</span> |
yellow |
<span class="pre">'k'</span> |
black |
<span class="pre">'w'</span> |
blue |
green
<span class="pre">'r'</span>
red
<span class="pre">'c'</span>
<span class="pre">'m'<p></p></span>
magenta<span class="pre">'y'<p></p></span>
yellow🎜<span class="pre">'k'🎜</span>
🎜 🎜black🎜🎜🎜 <span class="pre">'w'🎜</span>
🎜🎜white🎜🎜🎜🎜🎜🎜🎜🎜🎜상关推荐:🎜🎜🎜🎜 🎜绘는 맞춤형 맞춤형 거북이 모양 🎜🎜🎜🎜🎜🎜CSS3绘 형식🎜🎜🎜🎜🎜🎜利용 Python중 거북이용 거북이 형식🎜🎜🎜 🎜🎜🎜iOS基本图形의 컴퓨터를 제조🎜🎜🎜
위 내용은 파이썬으로 그래픽 그리기의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

Arraysinpython, 특히 비밀 복구를위한 ArecrucialInscientificcomputing.1) theaRearedFornumericalOperations, DataAnalysis 및 MachinELearning.2) Numpy'SimplementationIncensuressuressurations thanpythonlists.3) arraysenablequick

Pyenv, Venv 및 Anaconda를 사용하여 다양한 Python 버전을 관리 할 수 있습니다. 1) PYENV를 사용하여 여러 Python 버전을 관리합니다. Pyenv를 설치하고 글로벌 및 로컬 버전을 설정하십시오. 2) VENV를 사용하여 프로젝트 종속성을 분리하기 위해 가상 환경을 만듭니다. 3) Anaconda를 사용하여 데이터 과학 프로젝트에서 Python 버전을 관리하십시오. 4) 시스템 수준의 작업을 위해 시스템 파이썬을 유지하십시오. 이러한 도구와 전략을 통해 다양한 버전의 Python을 효과적으로 관리하여 프로젝트의 원활한 실행을 보장 할 수 있습니다.

Numpyarrayshaveseveraladvantagesstandardpythonarrays : 1) thearemuchfasterduetoc 기반 간증, 2) thearemorememory-refficient, 특히 withlargedatasets 및 3) wepferoptizedformationsformationstaticaloperations, 만들기, 만들기

어레이의 균질성이 성능에 미치는 영향은 이중입니다. 1) 균질성은 컴파일러가 메모리 액세스를 최적화하고 성능을 향상시킬 수 있습니다. 2) 그러나 유형 다양성을 제한하여 비 효율성으로 이어질 수 있습니다. 요컨대, 올바른 데이터 구조를 선택하는 것이 중요합니다.

tocraftexecutablepythonscripts, 다음과 같은 비스트 프랙티스를 따르십시오 : 1) 1) addashebangline (#!/usr/bin/envpython3) tomakethescriptexecutable.2) setpermissionswithchmod xyour_script.py.3) organtionewithlarstringanduseifname == "__"

numpyarraysarebetterfornumericaloperations 및 multi-dimensionaldata, mumemer-efficientArrays

numpyarraysarebetterforheavynumericalcomputing, whilearraymoduleisiMoresuily-sportainedprojectswithsimpledatatypes.1) numpyarraysofferversatively 및 formanceforgedatasets 및 complexoperations.2) Thearraymoduleisweighit 및 ep

ctypesallowscreatingandmanipulatingC-stylearraysinPython.1)UsectypestointerfacewithClibrariesforperformance.2)CreateC-stylearraysfornumericalcomputations.3)PassarraystoCfunctionsforefficientoperations.However,becautiousofmemorymanagement,performanceo


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

WebStorm Mac 버전
유용한 JavaScript 개발 도구

DVWA
DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

SublimeText3 영어 버전
권장 사항: Win 버전, 코드 프롬프트 지원!

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기
