From e814dad98db5611ce055339499f2578f2c380c71 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 27 Nov 2020 10:58:55 +0100 Subject: Add rgb function --- gnuplot.org | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnuplot.org') 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 -- cgit v1.2.3