Image:Square wave closeup.png
From Wikipedia, the free encyclopedia
Size of this preview: 800 × 596 pixels
Full resolution (1,343 × 1,000 pixels, file size: 40 KB, MIME type: image/png)
| | This is a file from the Wikimedia Commons. The description on its description page there is shown below.
|
A square wave, showing discontinuities.
[edit] Instructions
See Wikipedia graph-making tips.
Generated in gnuplot with the following script:
#Set pretty PostScript output and filename set terminal postscript enhanced color lw 2 "Times-Roman" 20 set output "square.ps" #Set y axis limits so it doesn't go right to the edges of the graph set yrange [-1.5:1.5] set xrange [-0.5:2.5] #No legend for the functions set nokey #Add lightly-colored axes set yzeroaxis set xzeroaxis #Plot as lines and also points #with points: #1 = color red (linestyle 1?) #6 = point style 6 (render as circles in PostScript) plot "square.dat" with lines, "" with points 1 6
and data file:
square.dat
# X Y1 -1 -1 0 -1 0 0 0 1 1 1 1 0 1 -1 2 -1 2 0 2 1 3 1
I tried to use set clip points to make the points not plot at the edges of the graph, but it wasn't working, so I just set the xrange and made the first and last points outside of the graph instead of right on the edges.
Then I converted the square.ps file to PDF, opened it in Adobe Illustrator, changed the fill style for the circles, changed the line style for the vertical lines, and saved.
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 Square wave closeup.png
Created by User:Omegatron using gnuplot, possibly with post-processing in the GIMP (PNG) or Inkscape (SVG)
(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.
| Date/Time | Dimensions | User | Comment | |
|---|---|---|---|---|
| current | 16:49, 22 July 2005 | 1,343×1,000 (40 KB) | Omegatron |

