Matplotlib Scatter Plots | Creating Scatter Plots with Python for Data Science and Geoscience
Вставка
- Опубліковано 21 лип 2024
- In this short video, we will see how to make a scatter plot of well log data using the python library called matplotlib.
Scatter plots are excellent data visualization tools and can be used to identify relationships and correlations between variables.
If you haven't already, make sure you subscribe to the channel: / @andymcdonald42
If you have enjoyed this video and want to say thanks, feel free to buy me a coffee at the following link: buymeacoffee.com/andymcdonaldgeo
Chapters:
0:00 Introduction
1:14 Jupyter Notebook Section
1:23 Importing Libraries and Data
3:34 Creating a Basic Scatter Plot
4:41 Setting X-Axis and Y-Axis Limits
5:37 Adding Labels to the Axes
6:31 Adding a Third Variable for Colour
7:06 Adding a Colorbar and Changing the Colormap
9:01 Summary
----
The notebook for this video can be found on my GitHub repository at: github.com/andymcdgeo/Andys_Y...
Libraries used in this video:
LASIO: lasio.readthedocs.io/en/latest/
pandas: pandas.pydata.org
matplotlib: matplotlib.org
Equinor Volve Dataset: www.equinor.com/en/what-we-do...
-----
Thanks for watching, if you want to connect you can find me at the links below:
/ andymcdonaldgeo
/ geoandymcd
/ andymcdonaldgeo
www.andymcdonald.scot/
#welllogs #petrophysics #python #matplotlib #geoscience - Наука та технологія
Please share the video about the explanation reading the scatter plot and pairplot, because I still confuse how to read the plot, the correlation and relationships for each dot!
one of the best yt channel for petroleum students
Thanks very much Kuldip. 👍
absolutely enjoy these videos! thanks for sharing!
Thanks for such a clear exaplanation. Keep up the good work.
Glad it was helpful!
I really appreciate what you are doing, i was thinking how to aproach oil engineering to data visualization and also ML models, you make it easier, and interesting. Thank you!!!
Thanks! Glad to help!
Thank you so much for makinf this videos available, Can't wait for the fourth Tutorial for displaying Core data, there's codes that i didn't understand much especially the polyfit code line, I think it's M.L.
You are welcome! I will be covering that one in a future video.
@@AndyMcDonald42 and I will stay tuned for it, Have a nice day, sir. 😊
thanks for the video
please how can I get the Scatter Plots for two (y) axes
Thank you for your time
Thanks for this video. It’s possible to built the Gamma Ray bar custom colours instead of picking the rainbow? For example make low GR values in yellow and high brown?
Hi Karen, you certainly can make your own colourmaps. I can cover that in a future video if it is of interest? But in the meantime, I would recommend using the existing "YlOrBr" colour map, which is one I have used numerous times for the GR shading. You can find a full list here: matplotlib.org/2.0.2/examples/color/colormaps_reference.html
For a custom map, you could use:
import matplotlib
cmap = matplotlib.colors.LinearSegmentedColormap.from_list("", ["yellow","orange","brown"])
Hi sir,
I know you , you are working in Lloyd's Register. I really enjoyed your papers. you are best sir . keep it up ... sir
Thank you petro Ali, I am glad you enjoyed the video and the papers.
Good Day Sir, I have a csv file and am wondering how do I save it as a LAS file, since i see you read a LAS file as your data input.
This should be possible, but it will require a little bit of manual work. I would recommend having a look at the documentation on building a LAS file from scratch at the link below. It may be possible to do it from a pandas dataframe, but you should be able to do it from a numpy array as per the example.
I will add this onto my list of videos to make as this would be a good topic to cover.
lasio.readthedocs.io/en/latest/building.html
great!!
Thanks
Thanks for this. I was wondering how to change the shapes if you have many symbols.
If anyone knows kindly assist
Symbols can be changed using the marker argument in plt.scatter
If you want to change the marker based on a category, you could follow the suggestion here: stackoverflow.com/questions/44802561/python-plot-scatter-plot-with-category-and-markersize
It involves a bit more code and looping through the categories after you have applied groupby to the dataframe.