meshes and 3D ploting not working

70 views
Skip to first unread message

Akash Debnath

unread,
Jan 12, 2021, 7:35:32 AM1/12/21
to Fatiando a Terra
Hello sir,  
i have found a ipynb file of "earth modeling with fatiando'(https://nbviewer.jupyter.org/url/files.figshare.com/1073067/code_samples.ipynb) but in the portion of meshes and 3D ploting , its not running.

it shows....

there is no module name enthought.mayavi

why its happening?

please resolve this.


I have followed the fatiando installation as http://www.fatiando.org/dev/install.html#installing-with-conda

Leonardo Miquelutti

unread,
Jan 12, 2021, 6:00:28 PM1/12/21
to fati...@googlegroups.com
Hi,

the following recipe has been working for me on several different computers for fatiando version 0.5. I hope it helps.
  1. Download this file.

  2. On your Anaconda Prompt, type the following: conda config --set restore_free_channel true

  3. And then: conda-env create -n fatiando -f=path\to\fatiando.yml

    1. Replace path\to\ for the proper path where you put the fatiando.yml file

  4. Incompatibilities issues may arise. Check the packages that originated the incompatibilities, and edit the fatiando.yml file removing what is in front of the package name. For example:

    1. Change qt=5.6.2 for qt


--
You received this message because you are subscribed to the Google Groups "Fatiando a Terra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fatiando+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fatiando/294c814c-36d1-4f37-b4c7-1f3d869ac9f1n%40googlegroups.com.


--
Leonardo Guimarães Miquelutti

Akash Debnath

unread,
Jan 13, 2021, 3:34:28 AM1/13/21
to fati...@googlegroups.com
after following your instructions........the followings are come in anaconda prompt...also attached the pic



(new_fat) C:\Users\AKASHDOMAIN>conda config --set restore_free_channel true

(new_fat) C:\Users\AKASHDOMAIN>conda-env create -n fatiando -f=C:\Users\AKASHDOMAIN\Documents\MATLAB\ngri_project\fatiando.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - jpeg==9b=vc9_2


(new_fat) C:\Users\AKASHDOMAIN>conda-env create -n fatiando -f=C:\Users\AKASHDOMAIN\Documents\MATLAB\ngri_project\fatiando.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - jpeg==9b=vc9_2

You received this message because you are subscribed to a topic in the Google Groups "Fatiando a Terra" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fatiando/pGkPbqQ1IGY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fatiando+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fatiando/CACVk%3D4YpawdAtQP0AwNat5zD1CF3CbcuTa%3DH%3DEcLGdMv4U%3DnQA%40mail.gmail.com.
Screenshot (61).png

Leonardo Miquelutti

unread,
Jan 13, 2021, 5:40:34 AM1/13/21
to fati...@googlegroups.com
The 4th item in the instructions above deals with that problem.

Open the fatiando.yml file and replace the line
 - jpeg==9b=vc9_2 
for
 - jpeg==9b
and try again.

If it still does not work, replace it for
 - jpeg 



--
Leonardo Guimarães Miquelutti

Akash Debnath

unread,
Jan 13, 2021, 7:16:40 AM1/13/21
to fati...@googlegroups.com
Thank you very much sir...for your quick response....now it must run.

Akash Debnath

unread,
Jan 13, 2021, 11:56:07 AM1/13/21
to fati...@googlegroups.com
Why...the 3d plot comes on the mayavi window not below the cell....see the attached...another window open named exception.


Another...problem is...as follows
when trying to run the cell...as you see on the 2nd pic....that gives error...
and shows that ....

the model object has no attribute 'tesseroid'.


please resolve this....sir
Screenshot (62).png
Screenshot (63).png

Akash Debnath

unread,
Jan 16, 2021, 1:53:19 AM1/16/21
to fati...@googlegroups.com
Sir... please resolve the issue....why tesseroid not working?

Do I have to download it separately?

Akash Debnath

unread,
Jan 18, 2021, 12:38:03 PM1/18/21
to Fatiando a Terra

Hello, leonardo,.....sorry to disturb you.
didn't understand when try to draw polygon......error comes.....please suggest what to do?

ValueErrorTraceback (most recent call last) 
<ipython-input-19-5d551f612252> in <module>()
5 mpl.axis('scaled')
6 vertices = mpl.draw_polygon(area, mpl.gca(), ---->
 7 xy2ne=True) 
8 model = [mesher.PolygonalPrism(vertices, z1=0, 
9 z2=500, props={'density':500})]
C:\Users\AKASHDOMAIN\Anaconda3\envs\fatiando\lib\site-packages\fatiando\vis\mpl.pyc in draw_polygon(area, axes, style, marker, color, width, alpha, xy2ne) 
192 pyplot.show() 
193 if len(x) < 3: --> 
194 raise ValueError("Need at least 3 points to make a polygon") 
195 if xy2ne: 196 verts = numpy.transpose([y, x]) 
  ValueError: Need at least 3 points to make a polygon.
                           

Leonardo Miquelutti

unread,
Jan 18, 2021, 3:28:31 PM1/18/21
to fati...@googlegroups.com
You need at least 3 points to make a polygon. That's the error you are getting. 

So, I guess that you are drawing it wrongly. And, as far as I can remember, you should do it counterclockwise. To add a point, you simply click on the mouse button and do not hold it.



--
Leonardo Guimarães Miquelutti

Akash Debnath

unread,
Apr 8, 2021, 7:31:47 AM4/8/21
to Fatiando a Terra
Screenshot (87).png

Leonardo Miquelutti

unread,
Apr 8, 2021, 8:32:43 AM4/8/21
to fati...@googlegroups.com
My guess is because you are using %matplotlib inline, or something like that (possibly implicit). If you use qt, (you need to google it better how to "qt pop window jupyter notebook" or something like that), a window will pop up, then you can click on the window, draw your polygon, and see the magic happens (I love it).
 
Cheers,
Leo


Akash Debnath

unread,
Apr 8, 2021, 8:51:21 AM4/8/21
to Fatiando a Terra
from fatiando.vis import mpl

# Draw a polygon and make a polygonal prism
bounds = [-1000, 1000, -1000, 1000, 0, 1000]
area = bounds[:4]
mpl.figure()
mpl.axis('scaled')
vertices = mpl.draw_polygon(area, mpl.gca(),xy2ne=True)
model = [mesher.PolygonalPrism(vertices, z1=0, 
    z2=500, props={'density':500})]

the above code, I have used as mentioned in your earth model nootebook.
don't know how to call qt for pop up window.

Shib Sankar Ganguli

unread,
Apr 9, 2021, 9:08:37 AM4/9/21
to fati...@googlegroups.com

Best regards,

Shib Sankar Ganguli, Ph.D.  |   शिब शंकर गांगुली 

Research Scientist  |  शोध वैज्ञानिक
Deep Seismics Research Group |  गहरा भूकंपीय रिसर्च समूह
Assistant Professor | सहायक प्रोफेसर
Academy of Scientific & Innovative Research | वैज्ञानिक और अभिनव अनुसंधान अकादमी
CSIR-National Geophysical Research Institute (NGRI) | राष्ट्रीय- भूभौतीकीय अनुसंधान संस्थान (http://www.ngri.org.in/index.php

Office: Room No. 114 First Floor | Gas Hydrate & CSS Building | CSIR-NGRI

Uppal Road | Hyderabad-500007 | Telangana State | India 

Phone: +91-40-27012736 | Mobile: +91 7306343464

Web: https://shibganguli.wixsite.com/shib

My Research: https://scholar.google.com/citations?user=XCeaUN4AAAAJ

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Young Scientist Awardee, NASI Medal 2020; National Geoscience Awards 2017, Ministry of Mines (Govt. of India)

Former DST Inspire Faculty | Indian Institute of Technology (IIT) Kanpur (http://iitk.ac.in 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

"Research is what I'm doing when I don't know what I'm doing"--Wernher von Braun


BA_IOGL0.1deg.txt

Shib Sankar Ganguli

unread,
Apr 9, 2021, 11:42:49 AM4/9/21
to fati...@googlegroups.com
Dear All, 
Sorry, please ignore my earlier email.
Thanks for understanding.
Reply all
Reply to author
Forward
0 new messages