python - 在 Python 中将子图连接成一个图
问题描述
所以我有当前函数,它给了我一个圆圈和一个点在给定圆圈中心的图:
def epicentral_distance(station, differential_time_variable, Vp = 5.5, Vs = 3.2):
ri = differential_time_variable*(1/Vs - 1/Vp)**(-1)
print( np.round(ri,3) )
return np.round(ri,3)
def station_earthquake_GraphFunction(station,differential_time_variable, Vp = 5.5, Vs = 3.2):
radius = epicentral_distance(station, differential_time_variable, Vp = 5.5, Vs = 3.2)
fig, ax = plt.subplots(figsize = (5,5))
graph_station = plt.plot(station[0],station[1],'^r')
graph_circle = plt.Circle(station, radius, color = 'r',fill = False)
ax.add_artist(graph_circle)
plt.xticks(np.arange(-100,100,20))
plt.yticks(np.arange(-100,100,20))
return graph_station, graph_circle
我正在尝试使用这些值运行该函数:
station_earthquake_GraphFunction((10,10), 3.922)
station_earthquake_GraphFunction((15,45),3.272)
station_earthquake_GraphFunction((60,30),3.874)
这里有两个问题:
每次运行该函数时,我都会得到一个单独的图。我想运行该函数几次并将结果绘制在一个图表上。我该怎么做?
运行此函数 3 次后,我将有 3 个圆在给定点相交。如何确定交点的 x 和 y 值?
解决方案
推荐阅读
- r - 将 sjPlot::tab_model 表的列表保存在 word 文件或 RMarkdown 文件中
- r - 在雷达图中编辑 R 绘图轴标签
- c# - xamarin 表单中的 POST 请求
- linux - 是否可以从 Flutter linux 应用程序生成 linux .rpm 包?
- ios - 将 UITextInput 和 UITextView 放在 Container 或 UITableView 中?
- xcodebuild - 防止 `xcodebuild clean` 更新 SPM 依赖项
- amazon-web-services - Lambda 函数显示从存储桶获取对象时出错然后超时
- asp.net - 无法加载 Microsoft.Bcl.AsyncInterfaces
- python - QListWidget 复选框与项目选择同步
- python - 无法导入 Scapy arping() 方法