Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.28 KB

File metadata and controls

31 lines (24 loc) · 1.28 KB

Histograms, Graphs and Functions Exercises

Welcome to the exercises of the Histograms, Graphs and Functions learning module!

A macro to build a histogram

Create a macro which builds and draws a histogram with the following features:

  • The number of bins is 64 and the x axis ranges from 0 to 16.
  • It is filled with random numbers distributed according to a linear function (pol1).
  • Its line width is thicker than the default one.

You can find the solution here.

A macro to build a graph

Create a macro which builds and draws a graph with the following features:

  • The title of the plot is My graph.
  • The x and y axis have labels my_{X} and myY respectively.
  • The points are three and with these coordinates (1,0), (2,3), (3,4).
  • The marker is a full square. Its coulour is red.
  • A line joins the points and is orange.

You can find the solution here.

A macro to build a function

Create a macro that follows these steps:

  • Create a function with formula cos(x) and draw it.
  • Create another function which adds a parameter to cos(x).
  • Set a value for the parameter.
  • Change the color of the line of the second function.
  • Draw the second function in the same canvas as the first one.

You can find the solution here.