gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/hpcontour.lua
diff options
context:
space:
mode:
Diffstat (limited to 'hpcontour.lua')
-rw-r--r--hpcontour.lua 13
1 files changed, 5 insertions, 8 deletions
diff --git a/hpcontour.lua b/hpcontour.lua
index 10e9ec76..2387bfa4 100644
--- a/hpcontour.lua
+++ b/hpcontour.lua
@@ -22,6 +22,8 @@ local plcurve = require 'plcurve'
local M = {}
+local color = color_function('redyellow', 0.8)
+
local insert = table.insert
local function reverse(ls)
@@ -886,11 +888,6 @@ local function grid_create(f, left, right, nx, ny, nlevels_or_levels)
end
end
- local function color(a)
- -- return rgba(0.9, 0.9 - 0.9*a, 0, 0.8)
- return rgba(0.91 - 0.565*a, 0.898 - 0.753*a, 0.85 - 0.25*a, 0.8)
- end
-
local function curve_draw(pl, id)
local ln = path()
curve_add_path(ln, id, 'acw')
@@ -926,12 +923,12 @@ local function grid_create(f, left, right, nx, ny, nlevels_or_levels)
end
end
- local function grid_draw_lines(pl, color)
+ local function grid_draw_lines(pl, col)
local ln = path()
for id = 1, #curves do
curve_add_path(ln, id, 'cw')
end
- pl:addline(ln, color)
+ pl:addline(ln, col)
end
return {
@@ -941,7 +938,7 @@ local function grid_create(f, left, right, nx, ny, nlevels_or_levels)
draw_lines = grid_draw_lines}
end
-function M.plot(f, a, b, ngridx, ngridy, nlevels)
+function hpcontour(f, a, b, ngridx, ngridy, nlevels)
ngridx = ngridx and ngridx or 20
ngridy = ngridy and ngridy or 20
nlevels = nlevels and nlevels or 12
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月30日 07:48:13 +0000

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