Line Chart Types/Time Series/Function Plot

Function Plot

Render analytic mathematical functions across a domain without raw table data. Visualize sine waves, polynomials, and custom formulas as smooth, interactive line charts.

Intermediatefunctionanalyticgenerated datamathematical

Example

Guide

Overview

Function plots visualize mathematical functions by computing values across a continuous domain. Instead of plotting discrete data points, you define a function (e.g., y = sin(x) or y = x²) and the chart generates points automatically. These plots are particularly powerful for exploring complex mathematical expressions, analyzing function behavior, and comparing theoretical curves with empirical data.

When to use

  • Demonstrate mathematical concepts or equations
  • Compare theoretical models with actual data
  • Educational materials for calculus, physics, or engineering
  • Show ideal or reference curves
  • Visualize parametric or trigonometric functions

Not ideal

  • When you have actual discrete measurements (use regular line chart)
  • Complex functions requiring numerical integration
  • When interactivity to adjust function parameters isn't needed

Key variations

  • Single vs multiple functions on same axes
  • Parametric plots (x and y both as functions of t)
  • Polar functions (r as function of θ)
  • Piecewise functions with domain restrictions
  • Functions with adjustable parameters (sliders)

Use cases

  • Calculus education: plot derivatives, integrals, or limits
  • Physics: motion curves, wave functions
  • Statistics: probability distributions (normal, exponential)
  • Engineering: transfer functions, frequency response
  • Economics: cost curves, demand functions

Data (CSV)

x,y,series
-200.0,12.08,Function
-198.0,19.00,Function
-196.0,7.44,Function
-194.0,-8.89,Function
-192.0,-13.33,Function
-190.0,-5.73,Function
-188.0,0.94,Function
-186.0,0.34,Function
-184.0,1.44,Function
-182.0,14.54,Function
-180.0,33.48,Function
-178.0,39.26,Function
-176.0,22.64,Function
-174.0,-2.36,Function
-172.0,-12.36,Function
-170.0,-0.61,Function
-168.0,16.02,Function
-166.0,17.24,Function
-164.0,2.25,Function
-162.0,-11.82,Function
-160.0,-11.87,Function
-158.0,-3.11,Function
-156.0,1.37,Function
-154.0,-0.15,Function
-152.0,3.91,Function
-150.0,20.23,Function
-148.0,37.34,Function
-146.0,36.53,Function
-144.0,15.10,Function
-142.0,-7.63,Function
-140.0,-10.78,Function
-138.0,4.84,Function
-136.0,18.48,Function
-134.0,13.96,Function
-132.0,-2.83,Function
-130.0,-13.40,Function
-128.0,-9.61,Function
-126.0,-0.95,Function
-124.0,1.17,Function
-122.0,-0.12,Function
-120.0,7.56,Function
-118.0,26.05,Function
-116.0,39.55,Function
-114.0,31.87,Function
-112.0,7.44,Function
-110.0,-11.07,Function
-108.0,-7.45,Function
-106.0,10.07,Function
-104.0,19.23,Function
-102.0,9.54,Function
-100.0,-7.29,Function
-98.0,-13.62,Function
-96.0,-6.91,Function
-94.0,0.54,Function
-92.0,0.61,Function
-90.0,0.75,Function
-88.0,12.28,Function
-86.0,31.45,Function
-84.0,39.79,Function
-82.0,25.64,Function
-80.0,0.33,Function
-78.0,-12.42,Function
-76.0,-2.82,Function
-74.0,14.51,Function
-72.0,18.19,Function
-70.0,4.47,Function
-68.0,-10.73,Function
-66.0,-12.61,Function
-64.0,-4.19,Function
-62.0,1.27,Function
-60.0,0.02,Function
-58.0,2.71,Function
-56.0,17.77,Function
-54.0,35.88,Function
-52.0,37.94,Function
-50.0,18.36,Function
-48.0,-5.60,Function
-46.0,-11.69,Function
-44.0,2.51,Function
-42.0,17.64,Function
-40.0,15.52,Function
-38.0,-0.72,Function
-36.0,-12.90,Function
-34.0,-10.64,Function
-32.0,-1.79,Function
-30.0,1.31,Function
-28.0,-0.22,Function
-26.0,5.87,Function
-24.0,23.60,Function
-22.0,38.84,Function
-20.0,34.06,Function
-18.0,10.66,Function
-16.0,-9.85,Function
-14.0,-9.05,Function
-12.0,7.92,Function
-10.0,19.13,Function
-8.0,11.53,Function
-6.0,-5.50,Function
-4.0,-13.69,Function
-2.0,-8.08,Function
0.0,0.00,Function
2.0,0.87,Function
4.0,0.26,Function
6.0,10.17,Function
8.0,29.25,Function
10.0,39.94,Function
12.0,28.44,Function
14.0,3.24,Function
16.0,-12.11,Function
18.0,-4.91,Function
20.0,12.76,Function
22.0,18.84,Function
24.0,6.67,Function
26.0,-9.41,Function
28.0,-13.18,Function
30.0,-5.32,Function
32.0,1.05,Function
34.0,0.25,Function
36.0,1.74,Function
38.0,15.37,Function
40.0,34.15,Function
42.0,38.98,Function
44.0,21.53,Function
46.0,-3.26,Function
48.0,-12.25,Function
50.0,0.20,Function
52.0,16.49,Function
54.0,16.84,Function
56.0,1.46,Function
58.0,-12.14,Function
60.0,-11.57,Function
62.0,-2.75,Function
64.0,1.37,Function
66.0,-0.19,Function
68.0,4.39,Function
70.0,21.12,Function
72.0,37.79,Function
74.0,35.94,Function
76.0,13.93,Function
78.0,-8.28,Function
80.0,-10.38,Function
82.0,5.66,Function
84.0,18.71,Function
86.0,13.36,Function
88.0,-3.55,Function
90.0,-13.52,Function
92.0,-9.21,Function
94.0,-0.68,Function
96.0,1.10,Function
98.0,-0.05,Function
100.0,8.22,Function
102.0,26.91,Function
104.0,39.72,Function
106.0,31.01,Function
108.0,6.31,Function
110.0,-11.41,Function
112.0,-6.82,Function
114.0,10.81,Function
116.0,19.18,Function
118.0,8.80,Function
120.0,-7.88,Function
122.0,-13.54,Function
124.0,-6.49,Function
126.0,0.70,Function
128.0,0.51,Function
130.0,0.97,Function
132.0,13.07,Function
134.0,32.20,Function
136.0,39.65,Function
138.0,24.59,Function
140.0,-0.66,Function
142.0,-12.44,Function
144.0,-2.04,Function
146.0,15.07,Function
148.0,17.89,Function
150.0,3.68,Function
152.0,-11.15,Function
154.0,-12.37,Function
156.0,-3.79,Function
158.0,1.32,Function
160.0,-0.05,Function
162.0,3.11,Function
164.0,18.64,Function
166.0,36.43,Function
168.0,37.48,Function
170.0,17.20,Function
172.0,-6.36,Function
174.0,-11.40,Function
176.0,3.34,Function
178.0,17.97,Function
180.0,14.99,Function
182.0,-1.48,Function
184.0,-13.11,Function
186.0,-10.28,Function
188.0,-1.48,Function
190.0,1.27,Function
192.0,-0.20,Function
194.0,6.45,Function
196.0,24.48,Function
198.0,39.13,Function
200.0,33.31,Function

Design tips

  • Use data zoom to allow users to explore different regions of complex functions
  • Show minor ticks and grid lines for precise value reading
  • Set appropriate y-axis limits to prevent extreme values from dominating the view
  • Disable animations for mathematical plots to maintain precision
  • Consider adding the function formula in the subtitle for clarity
  • Use smooth curves sparingly—sharp angles better show actual computed points

Performance tips

  • Choose appropriate step size (smaller steps = smoother but slower)
  • For functions with rapid oscillations, increase sampling density
  • Disable smooth interpolation when accuracy is more important than aesthetics
  • Use data zoom to focus on regions of interest without loading all data
  • Cache computed points if the function is computationally expensive
  • Consider clipping or filtering infinite/undefined values for numerical stability

FAQ

How do I choose the step size? Balance smoothness with performance. For simple functions, (max - min) / 200 works well. For complex functions with rapid oscillations, use smaller steps (0.1 or less) to capture details.

How to handle discontinuities? Break the plot into separate segments at discontinuities, or filter out undefined values (e.g., tan(π/2) = ∞). Setting clip: true helps prevent rendering issues.

Can I zoom and pan the function plot? Yes! Use dataZoom with type: "inside" to enable mouse wheel zoom and drag-to-pan. This is essential for exploring complex functions across large domains.

How to overlay function plots with real data? Use the same coordinate system and ensure units match. Function plots work well as reference curves to compare theoretical models against empirical measurements.

Open in Line Graph Maker