How to choose a trend line (2024)

In a scatter plot , a trend line is great for showing a correlation in your data.If your data points are scattered all over the chart, a trend line is useless – but if you see a trend in the data that you want to show, Datawrapper can draw a trend line for you.

Index

  1. How to add a trend line
  2. Should you add a trend line?
    • Should you draw a trend line at all?
    • Choose the line that fits the data best
  3. Trend lines you can draw with Datawrapper
  • Linear
  • Custom
  • Quadratic, Cubic (polynomial)
  • Exponential, Logarithmic, Power
    • Exponential
    • Logarithmic
    • How the trend lines look differently when choosing a log scale

How to add a trend line

You can find the option Trend line at the bottom of Refine tab in Step 3: Visualize:

How to choose a trend line (1)

You have 7 options: How to choose a trend line (2)

Which trend line to choose

Should you draw a trend line at all?

First, it may be a good idea to question whether it's worth drawing a trend line at all. If the data is forced to fit a trend line, it may be more misleading than helpful.

Choose the line that fits the data best

Ideally, youshould choose the trendline where all data points have the smallest distance to thetrendline.

That is, in the image below, to keep the total distance of the red linesas small as possible:

How to choose a trend line (3)(This accuracy is sometimes shown as the R-squared value or the coefficient of determination (a number from 0 to 1 where 1 is the most accurate). Datawrapper doesn't calculate this for you, but calculating it might help you determine whether a trend line is a good enough fit or not.)

Trend lines you can draw in Datawrapper

There are many ways you can draw a trend line. Datawrapper allows you to draw some of the most useful ones:

Linear

How to choose a trend line (4)

If your data values increase/decrease at a constant rate and resemble a straight line, then chooselinear. This is probably the most common trend line and the one that's easiest to understand.

Custom

If your data values resemble a straight line but selectinglineardoesn’t fit the data best,then you can also draw one yourself by selecting custom.

How to choose a trend line (5)

Quadratic, Cubic (polynomial)

How to choose a trend line (6)

If your data fluctuates(goes up and down) and resembles a curved line, choose quadratic or cubic. These are part of what's called thepolynomial trend lines.Quadratic (Order 2 polynomial trend line) has one curve in the trend line. Cubic (Order 3) has two curves.

Exponential, Logarithmic, Power

If your data values don't resemble a straight line or a fluctuating curve but increase or decrease rapidlythen consider either exponential, logarithmic, or power.

Exponential

How to choose a trend line (7)

If your data increases at an increasing rate or decreases at a decreasing rate, then exponential might be a good fit. The exponential curve cannot take zeros or negative values.

Logarithmic

How to choose a trend line (8)

If your data increases rapidly but then flattens to a plateau, logarithmic might be a good fit.

How the trend lines look differently when choosing a log scale

If your data plot looks exponential and logarithmic, you might also want to considerchanging one of your axes to a log scale.

How to choose a trend line (9)

    You can learn more about log scales in our 3-part blog post about log scale. You can either turn one axis into a log scale or both axes into log scales and selecting the following options will draw a straight-line correlation between the two variables.

  • Linear-log plot (when thevertical axis is a log scale): chooseexponential - this type of trend is common in data with exponential growth (e.g. COVID case numbers) or exponential decay (e.g. decaying time of radioactive substance)
  • Log-linear plot (when thehorizontal axis is a log scale): choose logarithmic- this is less common compared to linear-log plot but for example used to show when data on the horizontal axis is unevenly distributed toward one end of the scale (e.g. Big Bang timeline, frequency distribution, pH distribution, etc.)
  • Log-log plot (when both axes are in log scales): choose power- when both axes are log scales, choosing a power trend line will draw a straight trend line between the two variables.

These are just some general hints and there are many other ways to calculate and determine the best-fit trend line for your data.

If you want to know how the trend lines are calculated in Datawrapper, they are based on the Javascript module regression-js so take a look at their GitHub page for details.

If you have any questions, reach out to us at support@datawrapper.de!

How to choose a trend line (2024)
Top Articles
Receive Money in Mexico
Sunset in 2026 – Planning for the Federal Estate Tax Exemption Reductions
Poe T4 Aisling
Somboun Asian Market
Rek Funerals
Bucks County Job Requisitions
Free VIN Decoder Online | Decode any VIN
The Idol - watch tv show streaming online
Fototour verlassener Fliegerhorst Schönwald [Lost Place Brandenburg]
Kent And Pelczar Obituaries
Campaign Homecoming Queen Posters
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Lake Nockamixon Fishing Report
Dignity Nfuse
Cyndaquil Gen 4 Learnset
Soccer Zone Discount Code
Spergo Net Worth 2022
Swgoh Turn Meter Reduction Teams
The Exorcist: Believer (2023) Showtimes
Saatva Memory Foam Hybrid mattress review 2024
Nordstrom Rack Glendale Photos
Halo Worth Animal Jam
Breckie Hill Mega Link
Marion City Wide Garage Sale 2023
Lost Pizza Nutrition
Lexus Credit Card Login
Craig Woolard Net Worth
Is Light Raid Hard
Cowboy Pozisyon
Sensual Massage Grand Rapids
Delta Math Login With Google
Wells Fargo Bank Florida Locations
Pixel Combat Unblocked
Warren County Skyward
Solarmovie Ma
Gideon Nicole Riddley Read Online Free
Craigslist Neworleans
Colorado Parks And Wildlife Reissue List
Pillowtalk Podcast Interview Turns Into 3Some
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
Emerge Ortho Kronos
Body Surface Area (BSA) Calculator
Craigslist Freeport Illinois
Lake Andes Buy Sell Trade
Lyndie Irons And Pat Tenore
13 Fun & Best Things to Do in Hurricane, Utah
How to Connect Jabra Earbuds to an iPhone | Decortweaks
Dicks Mear Me
Theater X Orange Heights Florida
Naughty Natt Farting
Ff14 Palebloom Kudzu Cloth
Famous Dave's BBQ Catering, BBQ Catering Packages, Handcrafted Catering, Famous Dave's | Famous Dave's BBQ Restaurant
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 6516

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.