Plot the Histogram of given data (txt. file with 3 columns)

Histogram of the absolute frequencies (use classes of width 0.5°C) and additional plot with the histogram of the relative frequencies.

Please plot the relative frequencies of the temperatures in the month October over the given period (Now class width 1°C).

Please help me to plot these two lots. Thank you so much
My txt. file looks like as below:
#% TIME_BEGIN TIME_END TEMPERATURE
19570901 19570930 13.2
19571001 19571031 10.4
19571101 19571130 6.2
19571201 19571231 2.3
19580101 19580131 2.1
19580201 19580228 4.5…

Is this a homework problem?

Consider using the following ingredients:

  1. DelimitedFiles, or one of the CSV libraries (with a space delimited) to read the data,
  2. parse the dates using Dates,
  3. make a histogram with StatsBase.Histogram,
  4. plot using your favorite plotting library.
2 Likes

You’re new to… MATLAB?

3 Likes

Hahaha…

I used to be a matlabhead. It’s like being a motorhead except the people are obsess with matlab instead of automobiles.

Hi @Haider17233. Welcome to the Julia forum.

Julia is a very different programming language from Matlab, even if the syntax is somewhat similar. If you have been assigned a homework problem in Matlab, then you should probably stick to Matlab, or use Octave, which is an open-source implementation of essentially the same language.

On the other hand, if you have the option of using either Matlab or Julia, then I think many people here would argue that Julia is the better choice, and are willing to help you get started.

4 Likes