Excel Python 3D Scatterplot - Episode 2620

Поделиться
HTML-код
  • Опубликовано: 4 июл 2024
  • Microsoft Excel Tutorial - Drawing a 3D Scatterplot using Python in Excel
    Download the workbook: www.mrexcel.com/youtube/TMyAA...
    Welcome to episode 2620 of MrExcel's netcast, where we explore the world of Excel and Python. In this episode, we will be diving into the world of 3D scatterplots in Python. In one of our earlier videos, we showed a cool scatter chart and someone asked, "How do we make a graph like that?" Well, that's what we'll be exploring today.
    This topic takes me back to my very first programming class in 11th grade, where I was trying to do something cool on a TRS-80 computer. I wanted to draw a circle using the radius times the SIN and COSINE of the degrees, but it didn't work. My teacher then told me to use radians, which I still don't fully understand to this day. So, in this video, we will be using the RADIANS function to convert degrees to radians and create a perfect circle.
    To create a fake data set, I decided to draw a bunch of circles using the MOD function to ensure that the degrees stay between zero and 360. Then, I used the SIN and COS of the RADIANs of the degrees to determine the radius and height of each circle. To make it more interesting, I also added a color variable that goes from zero to 18 and slowly expands the radius of each circle. This resulted in a dataset with X, Y, Z, and color values that we will be using to create our 3D scatterplot in Python.
    To create the scatterplot, we will be using the documentation from matplotlib, which has worked well for us in the past. However, in this case, it didn't work, so we turned to ChatGPT for help. They provided us with the Python code to create a 3D scatterplot from a DataFrame with columns for X, Y, and Z. We simply had to copy and paste the code, make a few adjustments, and voila! We had our 3D scatterplot with various marker choices, including circles, points, and even pixels.
    If you want to try this out for yourself, the link to download the workbook is in the RUclips description. And don't forget to Like, Subscribe, and Ring the Bell to stay updated on our latest netcasts. If you have any questions or comments, feel free to leave them down below. Thank you for watching and we'll see you next time for another netcast from MrExcel.
    Buy Bill Jelen's latest Excel book: www.mrexcel.com/products/latest/
    You can help my channel by clicking Like or commenting below: www.mrexcel.com/like-mrexcel-...
    This video answers these common search terms:
    How to plot a circle in an Excel XY Chart
    Converting degrees to radians in Excel
    Building X, Y, Z values for a series of circles in Excel
    Using Chat-GPT for Python Code for a 3D Scatter Plot
    Adapting the copied code
    Marker choices for Python Charts
    Table of Contents
    (0:00) Problem Statement - 3D Scatterplot in Python
    (0:14) Excel formulas to plot a circle in Excel
    (0:45) Convert degrees to Radians in Excel
    (1:15) Formulas to Create a 3D Spiral in Excel
    (2:45) Finding Python code from Chat-GPT
    (3:10) Adapting Python code for Excel
    (4:45) Making a tiny chart larger with a reference
    (5:23) Marker choices in Python
    (5:33) Clicking Like really helps the algorithm
    #excel #microsoft #microsoftexcel #exceltutorial #exceltips #exceltricks #excelmvp #freeclass #freecourse #freeclasses #excelclasses #microsoftmvp #walkthrough #evergreen #spreadsheetskills #analytics #analysis #dataanalysis #dataanalytics #mrexcel #spreadsheets #spreadsheet #excelhelp #accounting #tutorial
    Join the MrExcel Message Board discussion about this video at www.mrexcel.com/board/threads...

Комментарии • 6

  • @richardhay645
    @richardhay645 10 месяцев назад +3

    Keep going with Python!! Very valuabe addition in Excel. Chat GPT will do even better once it is fully imbeded in Excel. Then it should be able to write Excel Formulas with comple correct cell references.

  • @KodKod0323
    @KodKod0323 5 месяцев назад

    Thank you my god

  • @alanmonaghan9194
    @alanmonaghan9194 10 месяцев назад +1

    Excellent, but I noticed the 'Z' axis label didn't show. A bug perhaps?

    • @MrXL
      @MrXL  10 месяцев назад +1

      I’ve seen that too. Recently, I had a Z label of VBA and saw only the V. There is likely a setting to rotate the label ninety degrees.