# set the output
set terminal svg
set output "legendre_poly.svg"
set title "Legendre Polynomials"
# axis properties
set xrange [-1:1]
set yrange [-1:2]
set xlabel "x"
set ylabel "P_n (x)"
plot 1 ti "n = 0" with lines linewidth 2,\
x ti "n = 1" with lines linewidth 2,\
(3*x**2-1)/2 ti "n = 2" with lines linewidth 2,\
(5*x**3-3*x)/2 ti "n = 3" with lines linewidth 2,\
(35*x**4-30*x**2+3)/8 ti "n = 4" with lines linewidth 2,\
(63*x**5-70*x**3+15*x)/8 ti "n = 5" with lines linewidth 2
Then I postprocessed with Inkscape to change the stroke style of each line.
Date
Source
own work
This W3C-unspecified plot was created with Gnuplot.
I, the copyright holder of this work, hereby publish it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
I made it with the following Gnuplot code: <pre> # set the output set terminal svg set output "legendre.svg" set title "Legendre Polynomials" # axis properties set xrange [-1:1] set yrange [-1:2] set xlabel "x" set ylabel "P_n (x)" plo