2.įor drawing a single state in red or blue we first collect the results for every single state in the string variable ELEC. With the help of these two data sets we are able to create Fig. The election result can be 1 or 2 – corresponding to blue and red. In addition to the state border data we have another file that includes results from an example election and strings with the names of the states. At the end of this post the corresponding index numbers for every state are listed. This allows us to plot a single state with the help of the index command. Two double lines divide the single states. ( code to produce this figure, USA data, election data) ![]() The other settings in the file define the width of a single bin plotted as a box and its fill style.įig. Hist = 'u (binwidth*(floor(($1-binstart)/binwidth)+0.5)+binstart):(1.0) smooth freq w boxes'įor a detailed discussion on why calculates a histogram you should have a look at this discussion and the documentation about the smooth freq which basically counts points with the same x-value. # define macro for plotting the histogram The content of hist.fct, including the definition of looks like this The macro is defined in an additional file hist.fct and loaded before the plotting command. They were both given as one dimensional data and plotted with a defined macro that is doing the histogram calculation. 1 you see two different distributions of measured angles. ![]() ( code to produce this figure, hist.fct, data) 1 Two different distributions of measured angles.
0 Comments
Leave a Reply. |