Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/gnuplot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2013-06-14 13:52:12 +0400
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2013-06-14 13:52:12 +0400
commitd644cc3947b028a640c1baad77afd53994ade1f0 (patch)
tree0497641845ab120e7c7b280db044c794e7244db5
parentddd5f7c14c06ab8b63509b8482e769b6bb25251e (diff)
add documentation for gnuplot custom string
-rw-r--r--dok/index.dok112
1 files changed, 111 insertions, 1 deletions
diff --git a/dok/index.dok b/dok/index.dok
index 20cf710..d1dc869 100644
--- a/dok/index.dok
+++ b/dok/index.dok
@@ -30,6 +30,101 @@ therefore each plotting session is persistent and additional commands
can be sent. For advanced users [[#gnuplot.raw|gnuplot.raw]]
provides a free form interface to gnuplot.
+===== Customizing Gnuplot Defaults =====
+{{anchor:gnuplot.custom.dok}}
+
+The default styles of gnuplot can be customized using a personal ''.gnuplot'' file
+located in the users home directory. A sample file is given below as a sample. You can
+paste the contents into ''$HOME/.gnuplot'' file and gnuplot will use the styles
+specified in this file.
+
+<file>
+##### Modified version of the sample given in
+##### http://www.guidolin.net/blog/files/2010/03/gnuplot
+
+
+set macro
+
+##### Color Palette by Color Scheme Designer
+##### Palette URL: http://colorschemedesigner.com/#3K40zsOsOK-K-
+
+
+ blue_000 = "#A9BDE6" # = rgb(169,189,230)
+ blue_025 = "#7297E6" # = rgb(114,151,230)
+ blue_050 = "#1D4599" # = rgb(29,69,153)
+ blue_075 = "#2F3F60" # = rgb(47,63,96)
+ blue_100 = "#031A49" # = rgb(3,26,73)
+
+ green_000 = "#A6EBB5" # = rgb(166,235,181)
+ green_025 = "#67EB84" # = rgb(103,235,132)
+ green_050 = "#11AD34" # = rgb(17,173,52)
+ green_075 = "#2F6C3D" # = rgb(47,108,61)
+ green_100 = "#025214" # = rgb(2,82,20)
+
+ red_000 = "#F9B7B0" # = rgb(249,183,176)
+ red_025 = "#F97A6D" # = rgb(249,122,109)
+ red_050 = "#E62B17" # = rgb(230,43,23)
+ red_075 = "#8F463F" # = rgb(143,70,63)
+ red_100 = "#6D0D03" # = rgb(109,13,3)
+
+ brown_000 = "#F9E0B0" # = rgb(249,224,176)
+ brown_025 = "#F9C96D" # = rgb(249,201,109)
+ brown_050 = "#E69F17" # = rgb(230,159,23)
+ brown_075 = "#8F743F" # = rgb(143,116,63)
+ brown_100 = "#6D4903" # = rgb(109,73,3)
+
+ grid_color = "#d5e0c9"
+ text_color = "#222222"
+
+ my_font = "SVBasic Manual, 12"
+ my_export_sz = "1024,768"
+
+ my_line_width = "2"
+ my_axis_width = "1"
+ my_ps = "1.5"
+ my_font_size = "14"
+
+# must convert font fo svg and ps
+# set term svg size @my_export_sz fname my_font fsize my_font_size enhanced dynamic rounded
+# set term png size @my_export_sz large font my_font
+# set term jpeg size @my_export_sz large font my_font
+# set term wxt enhanced font my_font
+
+set style data linespoints
+set style function lines
+set pointsize my_ps
+
+set style line 1 linecolor rgbcolor blue_050 linewidth @my_line_width pt 7
+set style line 2 linecolor rgbcolor green_050 linewidth @my_line_width pt 5
+set style line 3 linecolor rgbcolor red_050 linewidth @my_line_width pt 9
+set style line 4 linecolor rgbcolor brown_050 linewidth @my_line_width pt 13
+set style line 5 linecolor rgbcolor blue_025 linewidth @my_line_width pt 11
+set style line 6 linecolor rgbcolor green_025 linewidth @my_line_width pt 7
+set style line 7 linecolor rgbcolor red_025 linewidth @my_line_width pt 5
+set style line 8 linecolor rgbcolor brown_025 linewidth @my_line_width pt 9
+set style line 9 linecolor rgbcolor blue_075 linewidth @my_line_width pt 13
+set style line 10 linecolor rgbcolor green_075 linewidth @my_line_width pt 11
+set style line 11 linecolor rgbcolor red_075 linewidth @my_line_width pt 7
+set style line 12 linecolor rgbcolor brown_075 linewidth @my_line_width pt 5
+set style line 13 linecolor rgbcolor blue_100 linewidth @my_line_width pt 9
+set style line 14 linecolor rgbcolor green_100 linewidth @my_line_width pt 13
+set style line 15 linecolor rgbcolor red_100 linewidth @my_line_width pt 11
+set style line 16 linecolor rgbcolor brown_100 linewidth @my_line_width pt 7
+set style line 17 linecolor rgbcolor "#224499" linewidth @my_line_width pt 5
+
+## plot 1,2,3,4,5,6,7,8,9
+set style increment user
+set style arrow 1 filled
+
+## used for bar chart borders
+set style fill solid 0.5
+
+set size noratio
+set samples 300
+
+set border 31 lw @my_axis_width lc rgb text_color
+</file>
+
===== Line Plotting =====
{{anchor:gnuplot.line.dok}}
@@ -55,7 +150,8 @@ specified. The possible entries of format string can be
* '+-' for points and lines
* '~' for using smoothed lines with cubic interpolation
* '|' for using boxes
- * 'v' for drawing vector fiels. (In this case, x and y have to two column vectors (x,xdelta),(y,ydelta))
+ * 'v' for drawing vector fiels. (In this case, x and y have to be two column vectors (x,xdelta),(y,ydelta))
+ * custom string, one can also pass custom strings to use full capability of gnuplot.
<file lua>
x=torch.linspace(-2*math.pi,2*math.pi)
@@ -71,6 +167,20 @@ gnuplot.plot({'Cos',x/math.pi,torch.cos(x),'~'},{'Sin',x/math.pi,torch.sin(x),'|
</file>
{{plot_sincos.png?400}}
+One can pass data with multiple columns and use custom gnuplot style strings too. When multi-column data
+is used, the first column is assumed to be the ''x'' values and the rest of the columns are separate ''y'' series.
+
+<file lua>
+x=torch.linspace(-5,5)
+y=torch.sin(x)
+yp = y+0.3+torch.rand(x:size())*0.1
+ym = y-(torch.rand(x:size())*0.1+0.3)
+yy=torch.cat(x,ym,2)
+yy=torch.cat(yy,yp,2)
+gnuplot.plot({yy,' filledcurves'},{x,yp,'lines ls 1'},{x,ym,'lines ls 1'},{x,y,'lines ls 1'})
+</file>
+{{plot_filled.png?400}}
+
===== Plotting 3D Surfaces =====
{{anchor:gnuplot.surface.dok}}