Nothing Special   »   [go: up one dir, main page]

File:Piecewise linear function gnuplot.svg

Original file (SVG file, nominally 802 × 603 pixels, file size: 71 KB)

Summary

Description
English: Plot of the piecewise linear function
Date
Source Own work
Author Jochen Burghardt
Other versions File:PiecewiseLinear.png * File:Piecewise linear function.svg * File:Piecewise linear function gnuplot.svg
Gnuplot source code
set xrange [-5:5]
set yrange [-3:3]
set xtics 1
set ytics 1

f(x) =  (            x <= -3    ? -3 - x        \   
        : -3 <= x && x <=  0    ? x + 3         \   
        :  0 <= x && x <=  3    ? 3 - 2*x       \   
        :                         0.5*x - 4.5   \   
        )

set grid

# y axis
set arrow from 0,-3 to 0,3 nohead lt 8

#x axis
  plot           0    with lines lt 8 lw 1 title ""

# plot the function
#replot           f(x) with lines lt 6 lw 3 title ""

# plot the function in pieces to avoid artifacts at interval boundaries
replot [x=-5:-3] f(x) with lines lt 6 lw 3 title ""
replot [x=-3: 0] f(x) with lines lt 6 lw 3 title ""
replot [x= 0: 3] f(x) with lines lt 6 lw 3 title ""
replot [x= 3: 5] f(x) with lines lt 6 lw 3 title ""
pause -1

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • 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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

copyrighted<\/a>"}},"text\/plain":{"en":{"P6216":"copyrighted"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P6216 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
Creative Commons Attribution-ShareAlike 4.0 International<\/a>"}},"text\/plain":{"en":{"P275":"Creative Commons Attribution-ShareAlike 4.0 International"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
original creation by uploader<\/a>"}},"text\/plain":{"en":{"P7482":"original creation by uploader"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

30 September 2020

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:22, 30 September 2020Thumbnail for version as of 12:22, 30 September 2020802 × 603 (71 KB)Jochen BurghardtUploaded own work with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata