Normal daily maximum variable along the y-axis. Thats temperature - - PDF document

normal daily maximum
SMART_READER_LITE
LIVE PREVIEW

Normal daily maximum variable along the y-axis. Thats temperature - - PDF document

Johns Hopkins University What is Engineering? M. Karweit Graphical Presentation Graphs, plots, charts, cartoonsthey all are part of the engineers arsenal for presenting


slide-1
SLIDE 1

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

1 Graphical Presentation Graphs, plots, charts, “cartoons”—they all are part of the engineer’s arsenal for presenting information. But, it’s not just the numbers that are to be presented, it’s the story or theory or importance of those numbers that you want the reader to grasp. How do you do that? What can you tell the reader in a graph? That’s the subject of this lecture. There are many types of graphs, charts, and plots: line plots, bar graphs, pie charts, scatter plots. Just look at all the possibilities that are offered in spreadsheet software, e.g., Excel. Are there reasons for choosing one over another? Maybe, in a report, we should just use a mix of them to give the reader a change of scenery? No. The type of graph and how you plot information is crucial to your being able to convey your message. Suppose you want to present the seasonal variation of maximum temperature in Baltimore. Here are the data. The tabular form gives all the information, so why do we even need to plot it? The answer is that we can illustrate features of data by plotting them, for example, the rate at which the temperature changes throughout the year, or how smooth the data are. What kind of a plot should we use? The simplest and often most appropriate, when one would like to visualize the relationship between two quantifiable variables is an x

  • vs. y plot.

Which is “x” and which is “y”?. There are two strings of data: the months, the maximum temperatures. In our table we chose to list the months first, then the temperatures. Why? Actually there is a reason. In doing so, we are implying that time, being listed first, determines temperature. Time is the independent variable; temperature is the dependent variable. There is a causal

  • relationship. So, we’re actually talking about y = f(x), in this case, temperature = f(time
  • f year). In a plot, we will want to convey that same implication. By convention, the

independent variable is plotted along the x-axis, the dependent variable along the y-axis. That’s important, because readers will automatically assume that the independent variable lies along the abscissa. Here’s the plot. Don’t you agree it tells us more than a tabulated set of numbers? Here,

Baltimore max temperatures Month temp (deg F) Jan 40.2 Feb 43.7 Mar 54.0 Apr 64.3 May 74.2 Jun 83.2 Jul 87.2 Aug 85.4 Sep 78.5 Oct 67.3 Nov 56.5 Dec 45.2

Normal daily maximum temperature for Baltimore

20 40 60 80 100 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Month temperature (deg F)

slide-2
SLIDE 2

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

2 you can see how the temperature changes month-by-month. It changes most rapidly during the spring and fall—an observation easy to make from a plot; hard to make from a tabulation of values. We can also visualize the smooth transition from one month to the

  • next. In fact, we might be tempted to draw line segments between the data points. But

that would be wrong. It is almost never appropriate to connect data points by lines (in spite of the fact that Excel offers a half-dozen plot styles that do so.) The reason it is wrong to put lines between the points is that, in doing so, you are suggesting that along the line is where other data would fall. You almost never know where other data will

  • fall. The only time it’s appropriate to draw a curve or line is when it represents a theory
  • r analytic function. Then the viewer can judge for himself whether the data fit the

theory. Plots, graphs, and charts should always be fully annotated. That is, they should tell the whole story all by themselves. There should be no need for a reader to pore over the text to discover what the plot is about. Yes, it’s OK to elaborate further about the data in the text. But the plot with it’s figure caption should stand alone. Graphs need legends, axis descriptions, unit designations, titles. What else should we pay attention to in a simple plot? Scaling is one. We probably don’t have to discuss why it would be inappropriate to scale the y-axis from 0 to 1000 degrees. But why have we chosen a range of 0 to 100? We might have chosen a y- scaling of 40 degrees to 90 degrees. That would have certainly contained the data. By scaling it from 0 to 100 degrees, we offer the viewer an increased sense of the

  • temperature. Maximum temperatures in inhabitable areas lie roughly between 0 and
  • 100. So by choosing 0 to 100, we present not only Baltimore’s temperature range, but

also where that range fits with respect to other inhabitable areas. It’s a subtle way of conveying a little more information. What if one of the variables isn’t quantifiable? That is suppose you want to present graphically “days to maturity” for growing a variety of vegetables. “days to maturity” is quantifiable. Type of vegetable is not. Here, a bar chart is appropriate. In a bar chart one axis suggests quantity, the other does not. Here’s a hypothetical example of product satisfaction vs. brand. And with this example, we also illustrate the importance of

  • scaling. This chart might

appear as a magazine advertisement for Our Brand. First, notice that the brands could have been placed in any order and in any position horizontally, because Product satisfaction

Brand B Brand C Our Brand

75 80 85

Brands % satisfaction

slide-3
SLIDE 3

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

3 in bar charts, position does not necessarily connote value as in the case of x vs. y plots. If “brand” were quantifiable, for example, by including the cost for the product, then position could be used to emphasize that trait. But the bar chart style could still be used for impact. Now let’s turn our attention to the scaling of the bars. Here, “creative” scaling is used in an attempt to convince the consumer that Our Brand is far superior to others. At first glance, Our Brand does seem so much better than the others. Look how much higher the bar is! Only when one scrutinizes the scale does one realize that there is almost no difference between the brands. In fact, the error in estimating product satisfaction could very well be greater than the entire range of the graph. The graph is not lying, but its scaling attempts to mislead. This is the venue of marketing, not

  • engineering. Be careful with your scaling.

What about information that always adds up to one, or 100%?—like How your tax dollars were spent, Proportions of ethnicities in the U.S., Distribution of engineering students by field of study. An excellent way to give a visual impression of percentages is with a pie chart; one total “pie” equals 100%. Here’s one for the distribution of full- time engineering graduate students in 1997. What could be visually clearer? In one glance, the viewer sees the overall picture. There’s a lot of electrical engineering students; not so many aerospace students. And, with the notation n=65594, the number of students in each discipline can be determined. These first few graphs have been simple: pick the right type; plot the data as is. But, plotting the data “as is” does not always display what you’d like to focus on. Consider the following: you are measuring the Euler buckling load of aluminum rod— the compressive load at which the rod just begins to bend. You suspect that the buckling load F is related to rod length L by a power law F(L) ∝ Ln . You’d like to see if that’s Distribution of full-time graduate students in engineering, 1997. (n=65594)

Aerospace 4% Other 12% Chemical 9% Civil 17% Electrical 28% Industrial 8% Mechanical 16% Materials 6%

slide-4
SLIDE 4

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

4 true, and you’d like to estimate the value of n. It’s a two variable problem, so a plot of y

  • vs. x would seem most appropriate. Here’s the data and a resulting plot.

What have we learned from this plot? Not too much. There’s appreciable scatter in the data, and the longer the rod, the smaller the buckling load. That’s about it. Is there another way to plot this information to offer a little more insight into the relationship between load F and length L? In fact there is. Rather than plot F vs. L, plot log F vs. log

  • L. Then the functional form of F(L) would be transformed into log F = n log L, i.e., a

straight line with slope n. If we do that, we get the following plot. Now what do we see? By plotting the logs rather than the values themselves, we’ve demonstrated that the relationship between F and L is indeed a power law, because the data points fall along a straight line (more or less). Then, by fitting a straight line to the points, we’ve inferred that the power n = - 1.8. Since we have significant scatter in the data, and most power laws in engineering are integer powers, we might guess that the real n = -2. (n = -2 is the theoretical answer.) These inferences are obtainable only because we thought to plot our data in a particularly beneficial way. Notice, here our interest is in the linearity and slope of the data. That’s a somewhat different interest than we had when we plotted Baltimore temperature vs. time of year. To emphasize linearity and slope, we choose a scaling that does not have a very natural origin: (0.5, 1.5). But that’s

  • OK. We told the story that we wanted to tell.

Buckling load length(cm) load(gm) 6.4 230 6.47 290 7.11 245 8.16 200 9.21 130 11.32 90 12.3 85 12.63 85 13.24 75 13.94 75 14.75 60 15.15 55 15.85 50

Buckling load of rods vs. length

50 100 150 200 250 300 350 5 10 15 20 Length (cm) Buckling load (g)

log(buckling load) vs. log(length)

y = -1.8116x + 3.8996 1.5 2 2.5 0.5 1 1.5 log(length(cm)) log(load(gm))

slide-5
SLIDE 5

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

5 Plotting log F vs. log L appears to provide a lot of

  • insight. It’s probably the

best way to present the data. However, there’s another identically equivalent way: plotting F vs. L on log-log

  • axes. A log axis means that

distances along an axis represent not the value, but the logarithm of the value. Log-log axes means that both axes are configured that

  • way. Here we plot our

same buckling data on log-log axes. Note that the data look the same as they did when we plotted log F vs. log L. It’s just the axes that are different, and this time they reflect the values of the actual data. This isn’t really a very good plot because the data occupy

  • nly a very small percantage of the plot area. The trouble is that there is no suitable way

to label log axes other than in powers of ten. So, in this case it may have been better to plot the logarithm of the data, as we did in the previous plot, just to obtain better resolution of the points. Another engineering decision. . . Sometimes how one presents data can really provide additional information to a

  • process. Here’s some sailboat speed data taken

in a 20kt wind at different angles of sail with respect to the wind. What can we learn from just the data? First, it appears that the fastest point of sail is 120o off the wind, i.e., the wind is slightly behind the boat. When the wind is directly behind the boat, the boat is one knot slower. That alone is interesting. As the boat heads into the wind—closer than 40o—boat speed begins to drop very quickly. (In fact, a sailboat will come to a complete stop at 20o into the wind.) OK, so that’s what a table of data can tell us. Can plotted data tell us more?

  • Yes. Often a sailor will need to sail a

course directly into the wind. But sailboats won’t sail directly into wind. So the sailor must “tack” or zig-zag back and forth toward the wind. The question is: “what’s the best sailing angle to Buckling load of rods vs. length

10 100 1000 1 10 100 Length (cm) Buckling load (g)

Direction w.r.t. the wind (deg) Sailboat speed (kts) 30 7.8 40 9.0 50 9.6 60 9.8 70 10.0 80 10.2 90 10.2 100 10.2 110 10.2 120 10.3 130 10.2 140 10.0 150 9.8 160 9.6 170 9.4 180 9.3

slide-6
SLIDE 6

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

6 do that?” Here’s where an appropriate plot can be really helpful—in this case a polar

  • plot. Here it is.

With this visual presentation of the data, it’s quite clear what the best heading is—about 40o with respect to the wind. Further, the blue line also tells us how good it is: it seems that we’ll make approximately 7.5knots in the direction of the wind. The plot also shows how boat speed falls

  • ff as the boat begins to

head into the wind. As a graph, all this information becomes

  • evident. As a table of data, some of it would be obscured.

Some comments about the plot. First, we were dishonest. Data exist only for angles between 30o and 180o. The other plotted points were assumed to Wind sailboat speed vs. wind heading 180o 90o

15kt 10 5 sailing heading for maximum windward performance

270o

maximum speed to windward: 7.5kts

slide-7
SLIDE 7

Johns Hopkins University What is Engineering? M. Karweit 5/26/01 Presentations

7 First of all, graphs are multi-dimensional. That is, even though they are on a flat piece of paper, they convey one, two, or three dimensional (or more) information. What do I mean by dimensional information? Usually there is a single variable that you want to

  • display. But you want to present it as a function of some other parameter.

Mathematically, we can characterize it as v(t), or T(x,y), or P(x,y,z).

temperature change of 1 gm of H20 with applied heat

  • 50

50 100 150 200 200 400 600 800 1000 total heat (calories) water temperature (deg C)

dT/dh=1 dT/dh=1