Image:Rectified waves.png
From Wikipedia, the free encyclopedia

Size of this preview: 800 × 593 pixel
Image in higher resolution (1160 × 860 pixel, file size: 87 KB, MIME type: image/png)
![]() | This is a file from the Wikimedia Commons. The description on its description page there is shown below. |
This file has been superseded by Image:Rectification.svg. It is recommended that the other file be used. If you just added this tag and want to nominate this image for deletion, please check if it is used and if so replace it with the new image.
Afterwards please add the following code to here: (Please review the discussion here.)
Important: Before deleting this file, check if the new one is really superior! Also check:
Afrikaans | Alemannisch | العربية | Български | Česky | Dansk | Deutsch | English | Ελληνικά | Esperanto | Español | Français | Galego | עברית | हिन्दी | Magyar | Bahasa Indonesia | Ido | Italiano | 日本語 | 한국어 | Nederlands | Norsk (nynorsk) | Polski | Português | Românǎ | Русский | Slovenščina | Српски | Svenska | Türkçe | 简体中文 | 正體中文 | +/- |
This shows a sine wave, then half-wave and full-wave rectified versions of it.
[edit] Instructions
See Wikipedia graph-making tips.
Generated in gnuplot with the following script (save as rectified_waves.plt and then open in gnuplot):
set samples 9001 set terminal postscript enhanced landscape color solid lw 2 "Times-Roman" 20 set output "rectified_waves.ps" # Define the four curves sine(x) = sin(x*pi) half(x) = sine(x)>0?sine(x):0 full(x) = abs(sine(x)) # Set up a four-pane multiplot set size 1,1 set origin 0,0 set multiplot 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 # Squish them together slightly # (Doesn't accept fractional margins???) set bmargin 1 set tmargin 0 # Plot each graph # I don't understand how the labels work in multiplot, but this gives the right output set size 1,0.333333333333 set origin 0,0.66666666 set label 1 "Sine wave" at 4.5, -0.5 c plot sine(x) 1 set size 1,0.3333333 set origin 0,0.3333333 set label 1 "Half-wave rectified" at 4.5, -0.5 c plot half(x) with lines 2 set size 1,0.3333333 set origin 0,0 set label 1 "Full-wave rectified" at 4.5, -0.5 c plot full(x) with lines 3 unset multiplot
Then I opened the rectified_waves.ps file in a text editor to edit the line colors and linestyles, as per this description. This avoids needing to open in proprietary software, and really isn't that difficult (especially if you don't know the commands in the proprietary software either). ;-) Identify the lines easily by their color (the arrow is currently magenta and I want it to be black. Ah, there is the entry with 1 0 1, red + blue = magenta) or by using the gnuplot linestyle−1. (For instance, gnuplot's linestyle 3 corresponds to the ps file's /LT2.) Then you can edit the colors and dashes by hand.
I changed the original:
/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def
into this:
/LT1 { PL [4 dl 2 dl] 0 0.7 0 DL } def
to make the green a little less neon.
To convert the PostScript file to PNG:
- Open it in the GIMP (make sure you have ghostscript installed! - Windows instructions)
- Enter 500 under Resolution (it doesn't say "DPI" but I think that's what it means)
- Uncheck Try bounding box (since the bounding box cuts off the edge, unfortunately. You can try with the bounding box first.)
- Enter large values for Width and Height
- Check Color
- Check Strong anti-aliasing for both graphics and text
- Crop off extra whitespace (Shift+C if you can't find it in the toolbox)
- Possibly need to rotate it: Click Image → Transform → Rotate 90 degrees clockwise
Filters → Blur → Gaussian blur at 2.0 px(No need to blur if you use strong anti-aliasing during conversion. I see no significant difference between end results.)- Image → Scale Image...
- Width and Height at 25%
- Cubic interpolation
- You can view at normal size if you want by pressing 1, Ctrl+E
- Save as Rectified waves.png
Source: Created by User:Omegatron using gnuplot, possibly with post-processing in the GIMP (PNG) or Inkscape (SVG)