File:Waveforms.svg

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Waveforms.svg(SVG file, nominally 950 × 750 pixels, file size: 36 KB)

PostScript → PNG version

This is a test of gnuplot's SVG output, to compare to the results with postscript output and PNG conversion.

This shows several waveforms: sine wave, square wave, triangle wave, and rising sawtooth wave.

The PNG version looks much nicer.

Could be better. I used the wrong words for the font face, and I am probably doing the margins and graph size wrong.

Uses the same data files as Image:waveforms.png, and the following gnuplot code:

[edit] Source code

set samples 3001
#set terminal postscript enhanced landscape color solid lw 2 "Times-Roman" 20
set terminal svg size 1000 750 fname "Times New Roman" fsize 20
set output "waveforms.svg"

# Define the four curves
sine(x) = sin(x*pi)
#(Originally was going to graph others as functions, but data files are easier)

# Set up a four-pane multiplot
set size 1,1
set origin 0,0

set grid

# Set range of x axis
set xrange [0:6]

# Gridlines at every cycle
set ytics 1

# Ticks distract from wave shapes
set ticscale 0

# Show extents but don't waste space
set yrange [-1.5:1.5]

# No numbers needed; these are for shape comparison
set format x ""
set format y ""

set nokey

#I dont undertand how this works
set bmargin 0
set tmargin 0

g=.04

set multiplot

# Plot each graph
# I don't understand how the labels work in multiplot, but this gives the right output

set size 1,0.25-g
set origin 0,0.75 + g/2
set label 1 "Sine" at 5.5, 0.5 c
plot sine(x) 1

set size 1,0.25-g
set origin 0,0.5 + g/2
set label 1 "Square" at 5.5, 0.5 c
plot "square.dat" with lines 2

set size 1,0.25-g
set origin 0,0.25 + g/2
set label 1 "Triangle" at 5.5, 0.5 c
plot "triangle.dat" with lines 3

set size 1,0.25-g
set origin 0,0 + g/2
set label 1 "Sawtooth" at 5.5, 0.5 c
plot "sawtooth.dat" with lines 4

unset multiplot

Created by User:Omegatron using gnuplot, possibly with post-processing in the GIMP (PNG) or Inkscape (SVG) (actually no GIMP for SVG images)


I, the copyright holder of this work, hereby publish it under the following licenses:
Creative Commons license
Creative Commons Attribution iconCreative Commons Share Alike icon
This file is licensed under the Creative Commons Attribution ShareAlike 3.0, Attribution ShareAlike 2.5, Attribution ShareAlike 2.0 and Attribution ShareAlike 1.0 License. In short: you are free to share and make derivative works of the file under the conditions that you appropriately attribute it, and that you distribute it only under a license identical to this one. Official license.

Afrikaans | Български | Català | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | Estremeñu | Français | עברית | Hrvatski | Italiano | 日本語 | 한국어 | Lietuvių | Plattdüütsch | Nederlands | ‪Norsk (bokmål)‬ | Occitan | Polski | Piemontèis | Português | Română | Русский | Slovenčina | ไทย | 中文 | ‪中文(简体)‬ | ‪中文(繁體)‬ | +/−

GNU head 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".

Afrikaans | Aragonés | العربية | Asturianu | Беларуская | Беларуская (тарашкевіца) | Български | বাংলা | ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী | Brezhoneg | Bosanski | Català | Cebuano | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | فارسی | Suomi | Français | Gaeilge | Galego | עברית | Hrvatski | Magyar | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Kurdî / كوردی | Latina | Lëtzebuergesch | Lietuvių | Македонски | Bahasa Melayu | Nnapulitano | Plattdüütsch | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Occitan | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | తెలుగు | ไทย | Tagalog | Türkçe | Українська | اردو | Tiếng Việt | Volapük | Yorùbá | 中文 | 文言 | ‪中文(简体)‬ | ‪中文(繁體)‬ | +/-

You may select the license of your choice.

(In short, this means that you can copy and modify the image freely as long as you provide attribution; preferably in the form of a link back to this page.)

File history

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

(Latest | Earliest) View (newer 50) (older 50) (20 | 50 | 100 | 250 | 500)
Date/TimeDimensionsUserComment
current01:28, 23 October 2006950×750 (36 KB)Omegatron (Talk | contribs) (green was brighter in PNG)
01:24, 23 October 2006950×750 (40 KB)Omegatron (Talk | contribs) (sine wave was too jittery, used Inkscape's simplify command on it. sawtooth to purple, )
01:10, 23 October 20061,000×750 (47 KB)Omegatron (Talk | contribs) (manual fixes in inkscape)
01:01, 23 October 20061,000×750 (43 KB)Omegatron (Talk | contribs)
20:26, 25 March 20061,000×750 (48 KB)Omegatron (Talk | contribs) (Reverted to earlier revision)
06:09, 28 September 20051,000×750 (48 KB)Omegatron (Talk | contribs) (better)
02:25, 28 September 2005600×480 (24 KB)Omegatron (Talk | contribs) (testing gnuplot's svg output)
(Latest | Earliest) View (newer 50) (older 50) (20 | 50 | 100 | 250 | 500)

Personal tools