Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - English


fgrayplot

2D plot of a surface defined by a function using colors

Syntax

fgrayplot(x,y,f,[strf,rect,nax])
fgrayplot(x,y,f,<opt_args>)
h = fgrayplot(...)

Arguments

x,y

real row vectors.

f

external of type y=f(x,y).

<opt_args>

This represents a sequence of statements key1=value1, key2=value2,... where key1, key2,... can be one of the following: rect, nax, strf or axesflag and frameflag (see plot2d).

strf,rect,nax

see plot2d.

h

This optional output contains a handle to a Grayplot entity. Use h to modify its properties For a list of properties, see grayplot_properties.

Description

fgrayplot makes a 2D plot of the surface given by z=f(x,y) on a grid defined by x and y. Each rectangle on the grid is filled with a gray or color level depending on the average value of z on the corners of the rectangle.

Enter the command fgrayplot() to see a demo.

Examples

t=-1:0.1:1;
deff("[z]=my_surface(x,y)","z=x**2+y**2")
fgrayplot(t,t,my_surface,rect=[-2,-2,2,2])

See also

  • grayplot — 2D plot of a surface using colors
  • plot2d — 2D plot
  • Sgrayplot — smooth 2D plot of a surface using colors
  • Sfgrayplot — smooth 2D plot of a surface defined by a function using colors

History

VersionDescription
2025.0.0 Function returns the created handle(s).
Report an issue
<< fec properties 2d_plot grayplot >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:13:09 CEST 2024