author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年06月08日 15:34:02 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年06月08日 15:34:02 +0200 |
commit | 49c9e13904361964187b958b34f3e486e7e4d83a (patch) | |
tree | c01c35d974dca2f773136e0271c4d1f6eb845436 | |
parent | 971a2eab8c574ba401ff43877905c777571c4e7b (diff) | |
download | gsl-shell-49c9e13904361964187b958b34f3e486e7e4d83a.tar.gz |
-rw-r--r-- | contour.lua | 6 |
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 |