seg / tutorials-2014

Geophysical Tutorials for 2014
Apache License 2.0
41 stars 59 forks source link

issue with syntheic data generation #1

Open zeedotcom77 opened 7 years ago

zeedotcom77 commented 7 years ago

hi i have an issue if you plz help me out here when i use the code

area = [5000, 25000, 5000, 25000] bounds = [0, 30000, 0, 30000, 0, 5000] mpl_fig = plt.figure()

mpl.axis('scaled') mpl.square(area) dike_verts = mpl.draw_polygon(bounds[:4], mpl.gca(), xy2ne=True) dike_verts dike = PolygonalPrism(dike_verts, 0, 5000, {'magnetization': 10}) myv.figure(size=(600, 400)) myv.polyprisms([dike], linewidth=2) myv.axes(myv.outline(bounds), ranges=[b*0.001 for b in bounds], nlabels=3, fmt='%.1f') myv.wall_north(bounds) myv.wall_bottom(bounds) myv.savefig('tmp/model_dike.png') myv.show() Image(filename='tmp/model_dike.png')

i receive this error

C:\ProgramData\Anaconda2\lib\site-packages\fatiando\vis\mpl.py:70: UserWarning: This module will be removed in v0.6. We recommend the use of matplotlib.pyplot module directly. Some of the fatiando specific functions will remain. "specific functions will remain.") C:\ProgramData\Anaconda2\lib\site-packages\fatiando\vis\myv.py:53: UserWarning: This module will be removed in v0.7. warnings.warn("This module will be removed in v0.7.")

AttributeError Traceback (most recent call last)

in () 8 from fatiando.vis import myv, mpl 9 import fatiando ---> 10 print("Using Fatiando a Terra version {0}".format((fatiando.version))) 11 area = [5000, 25000, 5000, 25000] 12 bounds = [0, 30000, 0, 30000, 0, 5000] AttributeError: 'module' object has no attribute 'version' i am stuck here would you please help me thanks
leouieda commented 7 years ago

Hi @zeedotcom77, you're probably using a newer version of Fatiando a Terra. The results in the paper were generated using version 0.2. You'll need to install that version to run the code in notebooks. Or you'll need to update the code to work with the new version.

To install v0.2:

pip install fatiando==0.2