Reintroduce red/yellow color schema for contour plot - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年06月08日 15:34:02 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年06月08日 15:34:02 +0200
commit49c9e13904361964187b958b34f3e486e7e4d83a (patch)
treec01c35d974dca2f773136e0271c4d1f6eb845436
parent971a2eab8c574ba401ff43877905c777571c4e7b (diff)
downloadgsl-shell-49c9e13904361964187b958b34f3e486e7e4d83a.tar.gz
Reintroduce red/yellow color schema for contour plot
Add also a black background color for contour plot to reduce AGG white lines artifacts.
Diffstat
-rw-r--r--contour.lua 6
1 files changed, 5 insertions, 1 deletions
diff --git a/contour.lua b/contour.lua
index 69565adc..7d8e3278 100644
--- a/contour.lua
+++ b/contour.lua
@@ -23,7 +23,7 @@ use 'math'
local insert = table.insert
-local default_color_map = graph.hue_color
+local default_color_map = graph.color_function('redyellow', 1)
local function reverse(ls)
local k, n = 1, #ls
@@ -819,6 +819,8 @@ function contour.plot(f, x1, y1, x2, y2, options)
g.find_curves()
local p = graph.plot()
+ p:add(graph.rect(x1, y1, x2, y2), 'black')
+
g.draw_regions(p)
if opt 'lines' then g.draw_lines(p, 'black') end
@@ -841,6 +843,8 @@ function contour.polar_plot(f, R, options)
g.find_curves()
local p = graph.plot()
+ p:add(graph.ellipse(0, 0, R, R), 'black')
+
g.draw_regions(p)
if opt 'legend' then
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月04日 07:54:01 +0000

AltStyle によって変換されたページ (->オリジナル) /