Python Plotly Tutorial - Scatter Plot
Вставка
- Опубліковано 21 лип 2024
- Data visualization is an important part of working with data and Python has many libraries that allow you to display a wide range of charts. In this video we go over how to create scatter plots using the excellent Plotly library.
DOWNLOAD NOTEBOOK & DATA
Data and notebooks for my entire UA-cam series can now be found here:
github.com/andymcdgeo/Andys_Y...
REFERENCES & LIBRARIES
Plotly Library: plotly.com/python/
Books I Recommend:
As an Amazon Associate I earn from qualifying purchases. By buying through any of the links below I will earn commission at no extra cost to you.
PYTHON FOR DATA ANALYSIS: Data Wrangling with Pandas, NumPy, and IPython
UK: amzn.to/3HNycJ9
US: amzn.to/3DL7qPv
FUNDAMENTALS OF PETROPHYSICS
UK: amzn.to/3l1PgSf
PETROPHYSICS: Theory and Practice of Measuring Reservoir Rock and Fluid Transport Properties
UK: amzn.to/30UNWZS
US: amzn.to/3DNqBbd
WELL LOGGING FOR EARTH SCIENTISTS
UK: amzn.to/3FHsbfn
US: amzn.to/3CILAuE
GEOLOGICAL INTERPRETATION OF WELL LOGS
UK: amzn.to/3l2v2HV
US: amzn.to/30UOTkU
If you haven't already, make sure you subscribe to the channel: / @andymcdonald42
-----
Thanks for watching, if you want to connect you can find me at the links below:
/ andymcdonaldgeo
/ geoandymcd
/ andymcdonaldgeo
www.andymcdonald.scot/
Be sure to sign up for my newsletter to be kept updated when I post and share new content on UA-cam and Medium.
www.getrevue.co/profile/andym...
#petrophysics #python #geoscience #plotly - Наука та технологія
This was awesome. I'm a geologist learning python and was surprised that you were doing geological plots! I was just trying to learn to change the color scale in plotly, what a pleasant surprise!
This is one of the most useful videos you have made because scatter plots plays an important role in earth science.Thank you Andy
You're very welcome!
Thanks for information,The library is amazing!
Thank you so much for this video!
This is excatly what I was looking for.
Glad it was helpful!
Thank you good Sir, for sharing your overwhelming knowledge of datavisualization with your fellow plebeians!
Thanks. I am happy to share and glad to hear that it is useful 👍
Hi Andy! Thanks for sharing this video. It helps me a lot. Could you explain how to change the colour of each group? Thank you!
This is so cool.
Thank you for sharing and educating.
Glad it was helpful!
Thank you very much for sharing this content. It has been very useful to my work.
Cheers!!!
You're very welcome!
It was a really, really great tutorial. Learned alot. thanks, Andy..! Stay Blessed
Thanks. Glad you found it useful. 🙂
Hey Andy, this is really amazing and helpful and I'm definitely gonna use it. I'm wondering if there is a way to run a correlation between wells in the last 3D plot?, and create a 3D model for the wells across certain area..
Thanks so much for sharing your knowledge
Thanks for the comment. I am glad it has been helpful.
I would have a look at the gempy python library. It’s mainly used for 3D modelling. Not sure what they use behind the scenes to generate their plots, but it’s looks better than plain old matplotlib.
Here’s their website
www.gempy.org
This is really helpful, thanks so much, Andy! Wish you all the best and waiting for more geoscience videos
Thanks, Andy, this would be very helpful for me.
I want to ask you if, maybe, you can suggest to me a book in order to learn more things about petrophysics ... I have already read a few related to the nature of well-logs, but I'm looking some related with petrophysical calculations like how to calculate water/oil saturation or how to quantify Vshale. I am not familiar with RHOB Vs NPHI plots and the utility they have, so learning those things would be great for me.
Thanks in advance, and sorry for my English (I was born and raised in Colombia).
Thanks Jose. There are a number of books out there on the subject, but I would recommend the following:
The Geological Interpretation of Well Logs, by Malcolm Rider
Petrophysics by Djebbar Tiab
Fundamentals of Petrophysics by Shenglai Yang
Thank you for revealing essential techniques in python, what you do is really useful. Would you share the excel sheets that you are dealing with especially of this video?
Thanks Ola. I am glad you have found the videos useful.
I have just updated the GitHub repo with all of the required data: github.com/andymcdgeo/Andys_UA-cam_Notebooks
@@AndyMcDonald42 thanks a million 😊
Hey andy nice content man. How can scatter plot on top of a choropleth for data set ranging 700k to 1million records. Please help!! Require urgently
Thanks for the comment. Unfortunately I have not done much with Choropleth maps. Sorry I can't be more help on this one.
Can be changed the point size on the 3D plots?
Yes they can. You need to assign the plot to a variable, and then update the figure:
fig = px.scatter_3d(df_well, x='NPHI', y='RHOB', z='GR', range_x=[-0.05, 1], range_y=[3, 1.5], color='GROUP')
fig.update_traces(marker=dict(size=2))
How to give orientation of color bar to horizontal?
The following code will be able to change your colourbar to horiztonal:
fig.update_layout(coloraxis=dict(colorbar=dict(orientation='h', y=-0.15)))
Source: stackoverflow.com/questions/70695437/horizontal-colorscale-plotly-express
@@AndyMcDonald42 I've already resolved it. But anyway, tq for responding
Got the solution from Stack Overflow