matplotlib.pyplot.ylim #

matplotlib.pyplot. ylim ( * args , ** kwargs ) [fonte] #

Obtenha ou defina os limites y dos eixos atuais.

Assinaturas de chamada:

bottom, top = ylim()  # return the current ylim
ylim((bottom, top))   # set the ylim to bottom, top
ylim(bottom, top)     # set the ylim to bottom, top

Se você não especificar args, você pode alternativamente passar bottom ou top como kwargs, ou seja:

ylim(top=3)  # adjust the top leaving bottom unchanged
ylim(bottom=1)  # adjust the bottom leaving top unchanged

Definir limites desativa a escala automática para o eixo y.

Devoluções :
inferior, superior

Uma tupla dos novos limites do eixo y.

Notas

Chamar esta função sem argumentos (por exemplo ylim(), ) é o pyplot equivalente a chamar get_ylimos eixos atuais. Chamar essa função com argumentos é o pyplot equivalente a chamar set_ylimos eixos atuais. Todos os argumentos são passados ​​embora.

Exemplos usando matplotlib.pyplot.ylim#

Linhas infinitas

Linhas infinitas

Linhas infinitas
Texto Pyplot

Texto Pyplot

Texto Pyplot
Captura de quadros

Captura de quadros

Captura de quadros
funções interativas

funções interativas

funções interativas
Demonstração Findobj

Demonstração Findobj

Demonstração Findobj
Pyplot tutorial

Pyplot tutorial

Pyplot tutorial