|
|
爱搭讪的生菜 · State Migration ...· 1 年前 · |
|
|
爱听歌的凉面 · spring启动时只执行一次的方法实现_sp ...· 1 年前 · |
|
|
知识渊博的单车 · 使用react可排序自组织拖放tr元素时丢失 ...· 2 年前 · |
|
|
调皮的杯子 · 黑犬(漫画)_百度百科· 2 年前 · |
|
|
忐忑的拖把 · Defenders beware: A ...· 2 年前 · |
| 合同管理 买受人 房屋买卖合同 买卖合同 |
| https://scjgj.beijing.gov.cn/bsfw/bmfw/sfwbbm/shxfl/fw/201911/t20191128_708254.html |
|
|
打酱油的青蛙
2 年前 |
fill_between
with transparency
histtype
settings
plt.subplots
floating_axes
features
The Textbox widget lets users interactively provide text input, including
formulas. In this example, the plot is updated using the
on_submit
method.
This method triggers the execution of the
submit
function when the
user presses enter in the textbox or leaves the textbox.
Note: The
matplotlib.widgets.TextBox
widget is different from the following
static elements:
Annotations
and
Placing text boxes
.
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.widgets import TextBox
fig, ax = plt.subplots()
fig.subplots_adjust(bottom=0.2)
t = np.arange(-2.0, 2.0, 0.001)
l, = ax.plot(t, np.zeros_like(t), lw=2)
def submit(expression):
Update the plotted function to the new math *expression*.
*expression* is a string using "t" as its independent variable, e.g.
"t ** 3".
ydata = eval(expression, {'np': np}, {'t': t})
l.set_ydata(ydata)
ax.relim()
ax.autoscale_view()
plt.draw()
axbox = fig.add_axes((0.1, 0.05, 0.8, 0.075))
text_box = TextBox(axbox, "Evaluate", textalignment="center")
text_box.on_submit(submit)
text_box.set_val("t ** 2") # Trigger `submit` with the initial string.
plt.show()
References
The use of the following functions, methods, classes and modules is shown
in this example:
|
|
调皮的杯子 · 黑犬(漫画)_百度百科 2 年前 |