diff options
author | Alfredo Canziani <alfredo.canziani@gmail.com> | 2014-05-29 22:04:41 +0400 |
---|---|---|
committer | Alfredo Canziani <alfredo.canziani@gmail.com> | 2014-05-29 22:07:50 +0400 |
commit | 3673ac5e5591dcaae413b6c365cb5f6eb210d5b2 (patch) | |
tree | 70d7dd8f58803188013366f21ba2bef5e1b6990e | |
parent | 011c43bd02463b5bf3c4ab957c7eac0126d708b7 (diff) |
Added example for <gnuplot.raw>
-rw-r--r-- | README.md | 17 | ||||
-rw-r--r-- | doc/plot_raw.png | bin | 0 -> 36271 bytes |
2 files changed, 15 insertions, 2 deletions
@@ -34,8 +34,8 @@ provides a free form interface to gnuplot. ## Customizing Gnuplot Defaults ## 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 +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. ``` @@ -397,3 +397,16 @@ Sets the properties of axis for the current plot. This command is useful for advanced users of gnuplot. `command` is directly passed to gnuplot without any formatting. +Let's see an example, by plotting labels for the `xtic` + +```lua +LondonTemp = torch.Tensor{{9, 10, 12, 15, 18, 21, 23, 23, 20, 16, 12, 9}, + {5, 5, 6, 7, 10, 13, 15, 15, 13, 10, 7, 5}} +gnuplot.plot({'High [°C]',LondonTemp[1]},{'Low [°C]',LondonTemp[2]}) +gnuplot.raw('set xtics ("Jan" 1, "Feb" 2, "Mar" 3, "Apr" 4, "May" 5, "Jun" 6, "Jul" 7, "Aug" 8, "Sep" 9, "Oct" 10, "Nov" 11, "Dec" 12)') +gnuplot.plotflush() +gnuplot.axis{0,13,0,''} +gnuplot.grid(true) +gnuplot.title('London average temperature') +``` +![](doc/plot_raw.png) diff --git a/doc/plot_raw.png b/doc/plot_raw.png Binary files differnew file mode 100644 index 0000000..90ab6aa --- /dev/null +++ b/doc/plot_raw.png |