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:
authorAlfredo Canziani <alfredo.canziani@gmail.com>2014-05-29 22:04:41 +0400
committerAlfredo Canziani <alfredo.canziani@gmail.com>2014-05-29 22:07:50 +0400
commit3673ac5e5591dcaae413b6c365cb5f6eb210d5b2 (patch)
tree70d7dd8f58803188013366f21ba2bef5e1b6990e
parent011c43bd02463b5bf3c4ab957c7eac0126d708b7 (diff)
Added example for <gnuplot.raw>
-rw-r--r--README.md17
-rw-r--r--doc/plot_raw.pngbin0 -> 36271 bytes
2 files changed, 15 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5899432..c348925 100644
--- a/README.md
+++ b/README.md
@@ -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
new file mode 100644
index 0000000..90ab6aa
--- /dev/null
+++ b/doc/plot_raw.png
Binary files differ