summaryrefslogtreecommitdiff
path: root/tutorials/module_4/4.2 Interpreting Data.md
diff options
context:
space:
mode:
Diffstat (limited to 'tutorials/module_4/4.2 Interpreting Data.md')
-rw-r--r--tutorials/module_4/4.2 Interpreting Data.md82
1 files changed, 50 insertions, 32 deletions
diff --git a/tutorials/module_4/4.2 Interpreting Data.md b/tutorials/module_4/4.2 Interpreting Data.md
index c889b86..836d181 100644
--- a/tutorials/module_4/4.2 Interpreting Data.md
+++ b/tutorials/module_4/4.2 Interpreting Data.md
@@ -1,7 +1,7 @@
# Interpreting Data for Plotting
Philosophy of visualizing data
-A useful tool is using the acronym **PCC** to enforce legibility of your data.
+A useful tool is using the acronym **PCC** to enforce legibility of your data. These three principles form the foundation of data visualization and ensure your figures communicate meaning rather than just display numbers.
```mermaid
flowchart LR
@@ -11,24 +11,25 @@ flowchart LR
```
Whether we are preparing figures for a lab report or a research paper, these three elements should always be applied when presenting data. They ensure that our figures are clear, effective, and convey the intended message to our audience.
- - Purpose -> explain a process, compare of contrast, show a change or establish a relationship
- - Composition -> How do you arrange to components of the plot to clearly show the purpose
- - Color -> Using contrasts and colors to highlight important elements in a figure.
-We may re-iterate a figure 2 or 3 times until the figure shows the data we want to present is clear.
+- **Purpose** -> What are you trying to communicate? Are you explaining a process, comparing results, showing change, or revealing a relationship?
+- **Composition** -> How do you arrange the elements of your figure so that the story is clear?
+- **Color** -> How can you use contrast and tone to highlight key insights and guide your viewer’s attention?
+
+Remember: great figures rarely emerge on the first attempt. Iterating, refining layout, simplifying elements, or adjusting colors, helps ensure your data is represented honestly and effectively.
*Remember:* Data don't lie and neither should your figures, even unintentionally.
## Syntax and semantics in Mathematics - The meaning of our data
-In the English language, grammar defines the syntax—the structural rules that determine how words are arranged in a sentence. However, meaning arises only through semantics, which tells us what the sentence actually conveys.
+In the English language, grammar defines the syntax, the structural rules that determine how words are arranged in a sentence. However, meaning arises only through semantics, which tells us what the sentence actually conveys.
-Similarly, in the language of mathematics, syntax consists of the formal rules that govern how we combine symbols, perform operations, and manipulate equations. Yet it is semantics—the interpretation of those symbols and relationships—that gives mathematics its meaning and connection to the real world.
+Similarly, in the language of mathematics, syntax consists of the formal rules that govern how we combine symbols, perform operations, and manipulate equations. Yet it is semantics, the interpretation of those symbols and relationships, that gives mathematics its meaning and connection to the real world.
-As engineers and scientists, we must grasp the semantics of our work—not merely the procedures—it is our responsibility to understand the meaning behind it. YouTube creator and rocket engineer Destin Sandlin, better known as SmarterEveryDay, illustrates this concept in his video on the “backwards bicycle,” which demonstrates how syntax and semantics parallel the difference between knowledge and understanding.
+As engineers and scientists, we must grasp the semantics of our work, not merely the procedures, it is our responsibility to understand the meaning behind it. YouTube creator and rocket engineer Destin Sandlin, better known as SmarterEveryDay, illustrates this concept in his video on the “backwards bicycle,” which demonstrates how syntax and semantics parallel the difference between knowledge and understanding.
![Backwards Brain Bike](https://www.youtube.com/watch?v=MFzDaBzBlL0)
## Purpose - Why?
-Does the figure show the overall story or main point when you hide the text?
+> Does the figure show the overall story or main point when you hide the text?
Starting with the most important aspect of a figure is the purpose. What do you want to show? Why are we showing this? What is so important? These questions will help us decide on what time of plot we need. There are many types of plots and some are better for different purposes.
@@ -42,9 +43,9 @@ There are many other types of plots that you can choose from so it can be useful
- Clients (may not always be technical professionals).
## Composition - Making good plots
-Can you remove or adjust unnecessary elements that attract your attention?
+>Can you remove or adjust unnecessary elements that attract your attention?
-Composition refers to how you choose to format your plot — including labeling, gridlines, and axis scaling.
+Composition refers to how you choose to format your plot, including labeling, gridlines, and axis scaling.
Often, the main message of a figure can be obscured by too much information. To improve clarity, consider removing or simplifying unnecessary elements such as repetitive labels, bounding boxes, background colors, extra lines or colors, redundant text, and shadows or shading. You can also reduce clutter by adjusting or removing excess data and moving supporting information to supplementary figures.
@@ -52,30 +53,13 @@ If applicable, be sure to follow any additional formatting or figure guidelines
<img src="image_1760986811788.png" width="500" center="true">
-## Color - Highlight
-Does the color palette enhance or distract from the story?
-
-Similarly to composition using color or the absence thereof (gray scale) can help you draw the attention of the read to a specific element of the plot.
+## Color - Highlight Meaning
+>Does the color palette enhance or distract from the story?
-Here is an example of how color can be used to enhance the difference between the private-for-profit.
+Similarly to composition using color or the absence thereof (gray scale) can help you draw the attention of the read to a specific element of the plot. Here is an example of how color can be used to enhance the difference between the private-for-profit.
<img src="image_1760986545639.png" width="500">
-
-## In the end
-
-#### Data don't lie
-And neither should your figures, even unintentionally. So it's important that you understand every step that stands between your raw data and the final figure. One way to think of this is that your data undergoes a series of transformations to get from what you measure to what ends up in the journal. For example, you might start with a set of mouse weight measurements. These numbers get 'transformed' into the figure as the vertical position of points on a chart, arranged in such a way that 500g is twice as far from the chart baseline as 250g. Or, a raw immunofluorescence image (a grid of photon counts) gets transformed by the application of a lookup table into a grayscale image. Either way, exactly what each transformation entails should be clear and reproducible. Nothing in the workflow should be a magic "black box."
-
-#### Follow the formatting rules
-Following one set of formatting rules shouldn't be too hard, at least when the journal is clear about what it expects, which isn't always the case. But the trick is developing a workflow that is sufficiently flexible to handle a wide variety of formatting rules — 300dpi or 600dpi, Tiff or PostScript, margins or no margins. The general approach should be to push decisions affecting the final figure format as far back in the workflow as possible so that switching does not require rebuilding the entire figure from scratch.
-
-#### Quality
-Unfortunately, making sure your figures look just the way you like is one of the most difficult goals of the figure-building process. Why? Because what you give the journal is _not_ the same thing that will end up on the website or in the PDF. Or in print, but who reads print journals these days? The final figure files you hand over to the editor will be further processed — generally through some of those magic "black boxes." Though you can't control journal-induced figure quality loss, you can make sure the files you give them are as high-quality as possible going in.
-
-#### Transparency
-If Reviewer #3 — or some guy in a bad mood who reads your paper five years after it gets published — doesn't like what he sees, you are going to have to prove that you prepared the figure appropriately. That means the figure-building workflow must be transparent. Every intermediate step from the raw data to the final figure should be saved, and it must be clear how each step is linked. Another reason to avoid black boxes.
-
Checklist
- [ ] Select appropriate type
- [ ] Labels
@@ -85,8 +69,42 @@ Checklist
## Problem 1:
+```python
+import matplotlib.pyplot as plt
+import numpy as np
+
+# Pseudo data
+time_s = np.linspace(0,300,15)
+temperature_C = 20 + 0.05 * time_s + 2 * np.random.randn(len(time_s))
+
+
+# Plot
+plt.figure(figsize=(8,6))
+plt.plot(time_s, temperature_C, 'r--o', linewidth=5)
+plt.title("Experiment 3")
+plt.xlabel("x")
+plt.ylabel("y")
+plt.grid(True)
+plt.legend(["line1"])
+plt.show()
+
+# Plot (IMPROVED)
+plt.figure(figsize=(7,5))
+plt.plot(time_s, temperature_C, color='steelblue', marker='o', linewidth=2, label='Measured Temperature')
+plt.title("Temperature Rise of Metal Rod During Heating", fontsize=14, weight='bold')
+plt.xlabel("Time [s]", fontsize=12)
+plt.ylabel("Temperature [°C]", fontsize=12)
+plt.grid(True, linestyle='--', alpha=0.5)
+plt.legend(frameon=False)
+plt.tight_layout()
+plt.show()
+```
+
+
+## Data don't lie
+And neither should your figures, even unintentionally. So it's important that you understand every step that stands between your raw data and the final figure. One way to think of this is that your data undergoes a series of transformations to get from what you measure to what ends up in your final results. Nothing in the workflow should be a magic "black box".
-## Problem 2:
+## Problem 2: Misleading plots