matplotlib立体图

mplstereonet的Python项目详细描述


mplstereonet提供下半球等面积和等角度立体网 对于matplotlib。

Comparison of equal angle and equal area stereonets.

新功能

mplsteroNet-v0.5的主要变化是:

  • ax.cone绘制小圆的方法
  • 将极点和平面拟合到观测分布的各种函数(例如mplstereonet.fit_girdlemplstereonet.fit_polemplstereonet.eigenvectors
  • 平均向量计算和平均向量(mplstereonet.find_mean_vectormplstereonet.find_fisher_stats)的Fisher统计(多亏了Tobias Schónberg!)

基本用法

在大多数情况下,您需要import mplstereonet,然后生成一个轴 使用projection="stereonet"(默认情况下,这是一个等面积立体网)。 或者,您可以使用mplstereonet.subplots,它的函数相同 到matplotlib.pyplot.subplots,但创建立体网轴

例如:

import matplotlib.pyplot as plt
import mplstereonet

fig = plt.figure()
ax = fig.add_subplot(111, projection='stereonet')

strike, dip = 315, 30
ax.plane(strike, dip, 'g-', linewidth=2)
ax.pole(strike, dip, 'g^', markersize=18)
ax.rake(strike, dip, -25)
ax.grid()

plt.show()
A basic stereonet with a plane, pole to the plane, and rake along the plane

可以使用轴方法绘制平面、直线、极点和耙(例如 ax.line(plunge, bearing)ax.rake(strike, dip, rake_angle))。

所有平面测量都应遵循右手法则来指示 倾斜方向。举个例子,315/30s等于135/30 规则。

密度等值线

mplstereonet还提供了几种不同的生成轮廓的方法 定向密度图。

ax.density_contourax.density_contourf轴方法提供密度 等高线和填充密度等高线。“原始”密度网格 可以使用mplstereonet.density_grid函数生成。

作为一个基本示例:

import matplotlib.pyplot as plt
import numpy as np
import mplstereonet

fig, ax = mplstereonet.subplots()

strike, dip = 90, 80
num = 10
strikes = strike + 10 * np.random.randn(num)
dips = dip + 10 * np.random.randn(num)

cax = ax.density_contourf(strikes, dips, measurement='poles')

ax.pole(strikes, dips)
ax.grid(True)
fig.colorbar(cax)

plt.show()
Orientation density contours.

默认情况下,具有指数平滑[Vollmer1995]的改进kamb方法是 用于估计方向密度分布。其他方法(如 “传统的”Kamb[Kamb1956]和“Schmidt”(又名1%)方法是 也有。方法和预期计数(标准偏差)可以 分别由methodsigma关键字参数控制。

Orientation density contours.

实用程序

mplstereonet还包含许多用于分析结构的实用程序 以象限或方位角形式进行测量,以便它们遵循 右手定则。

例如,请参见parsing_example.py

Parse quadrant azimuth measurements
"N30E" --> 30.0
"E30N" --> 60.0
"W10S" --> 260.0
"N 10 W" --> 350.0

Parse quadrant strike/dip measurements.
Note that the output follows the right-hand-rule.
"215/10" --> Strike: 215.0, Dip: 10.0
"215/10E" --> Strike: 35.0, Dip: 10.0
"215/10NW" --> Strike: 215.0, Dip: 10.0
"N30E/45NW" --> Strike: 210.0, Dip: 45.0
"E10N   20 N" --> Strike: 260.0, Dip: 20.0
"W30N/46.7 S" --> Strike: 120.0, Dip: 46.7

Similarly, you can parse rake measurements that don't follow the RHR.
"N30E/45NW 10NE" --> Strike: 210.0, Dip: 45.0, Rake: 170.0
"210 45 30N" --> Strike: 210.0, Dip: 45.0, Rake: 150.0
"N30E/45NW raking 10SW" --> Strike: 210.0, Dip: 45.0, Rake: 10.0

此外,还可以通过以下方法找到平面交点并进行其他计算: 组合效用函数。见plane_intersection.pyparse_anglier_data.py例如

参考文献

[Kamb1956]Kamb, 1959. Ice Petrofabric Observations from Blue Glacier, Washington, in Relation to Theory and Experiment. Journal of Geophysical Research, Vol. 64, No. 11, pp. 1891–1909.
[Vollmer1995]Vollmer, 1995. C Program for Automatic Contouring of Spherical Orientation Data Using a Modified Kamb Method. Computers & Geosciences, Vol. 21, No. 1, pp. 31–49.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java传递实现接口的内部类   java为什么managedbean方法在post请求中的过滤器调用之前调用   java Android应用程序在Android M,O上崩溃,登录A/libc时出错:tid 17938中的致命信号11(SIGSEGV),代码2,故障地址0x343a2944   java JPA存储库。findByAll()返回null,但数据库中存在所有内容   用于发送电子邮件的java Ant脚本   Java小程序HTML页面发生了奇怪的事情   在Postman的请求正文中传递多个JSON数据,并使用Jersy(JXRS)进入Java Rest API   无法强制转换java DAO类   10分钟后重新连接java   正则表达式如何在java中选择字符串直到某个字符   java我的输出有一些问题   Objective中的java时间段   java如何在新屏幕上基于按钮单击在webview中打开url   java哪个selenium版本与Firefox ESR 45.2.0兼容   java无法使用Apache Camel 3.1.0将XML转换为JSON