Help with Histogram and Boxplot in Python

  • Context: Python 
  • Thread starter Thread starter SShep71
  • Start date Start date
  • Tags Tags
    Histogram Python
Click For Summary
SUMMARY

The discussion centers on creating a histogram and boxplot in Python using the annual rainfall data for Los Angeles from 1965 to 2006. The original poster (OP) lacks programming experience and seeks guidance on using Python for statistical visualization. Participants recommend utilizing the Matplotlib library, specifically the pyplot module, to generate the required plots. They emphasize the importance of demonstrating effort in the coding process to receive effective assistance.

PREREQUISITES
  • Basic understanding of Python programming
  • Familiarity with the Matplotlib library, specifically pyplot
  • Knowledge of statistical concepts such as histograms and boxplots
  • Ability to interpret data visualizations and identify outliers
NEXT STEPS
  • Learn how to install and set up Matplotlib for Python
  • Research examples of creating histograms using Matplotlib's pyplot
  • Study how to construct boxplots with Matplotlib and interpret their results
  • Explore data cleaning techniques to prepare datasets for visualization
USEFUL FOR

Students in statistics courses, aspiring data analysts, and anyone looking to visualize data using Python and Matplotlib.

SShep71
Messages
5
Reaction score
0
I could really use some help here, I am a transfer student so my course load is all out of order. I have a statistics course that requires me to use Python to solve this one question (the 2 parts shown below). I never took any sort of coding before, I don't know where to even start. Can anyone help with this boxplot and histogram? So I can input it into my Lab report.
The weather in Los Angeles is dry most of the time, but it can be quite rainy in the winter. The rainiest month of the year is February. The following table presents the annual rainfall in Los Angeles, in inches, for each February from 1965 to 2006.

Using Python:

2) Construct a histogram for these data.

4) Construct a boxplot for these data. Does the box-plot show any outliers?
php7Y0XKA.png
 
Technology news on Phys.org
You will need to show a lot more effort than that to get much help from us. What graphics toolkit (Tk) do you have that you want to use to plot these histograms? Or are you expected to plot them using ASCII output...?
 
I really want to provide more, but I honestly don't know what ASCII or a toolkit is at this point. The only programming I have ever done is G-code for CNC machine. All my instructions say is" Provide Python code and two plots" for the question and two plots.
 
berkeman said:
You will need to show a lot more effort than that to get much help from us. What graphics toolkit (Tk) do you have that you want to use to plot these histograms? Or are you expected to plot them using ASCII output...?
I would guess that the OP is expected to use pyplot. Examples of histograms and box plots using pyplot can be located with a search engine.
 
Last edited:
  • Informative
Likes   Reactions: berkeman

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
Replies
2
Views
2K
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
31K