summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpi2020-11-27 10:58:55 +0100
committerfpi2020-12-20 13:38:37 +0100
commite814dad98db5611ce055339499f2578f2c380c71 (patch)
treeed20f675e2c41ba06c4927ce5a009c5c31a799c7
parentUpdate symlinks (diff)
Add rgb function
-rw-r--r--gnuplot.org5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnuplot.org b/gnuplot.org
index 04973f5..0146e61 100644
--- a/gnuplot.org
+++ b/gnuplot.org
@@ -26,6 +26,11 @@ set style data lp
set macros
#+end_src
+
+Here is a handy function to define colors with individual rgb integers instead of the hex notation. Example usage: ~plot x w l lc rgb rgb(255,80,0)~. Alternatively gnuplot also supports hsv colors with ~hsv2rgb(h,s,v)~.
+#+begin_src gnuplot
+rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b)
+#+end_src
* Interactive Label Placement
[[http://www.gnuplotting.org/interactive-label-placing/][Source]]. I adapted the =label_loop= function to newer gnuplot syntax &
added functionality for multiple arguments. The function call to