Documentation Index
Fetch the complete documentation index at: https://mintlify.com/geogebra/giac/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Giac provides comprehensive plotting capabilities for both 2D and 3D graphics, including parametric plots, implicit plots, polar plots, and field plots.
2D Plotting Functions
plotfunc
gen plotfunc(const gen & f, const gen & vars, const vecteur & attributs,
int densityplot, double function_xmin, double function_xmax,
double function_ymin, double function_ymax,
double function_zmin, double function_zmax,
int nstep, int jstep, bool showeq, GIAC_CONTEXT);
Plots a function or set of functions.
Plot attributes (color, style, etc.)
Whether to create a density plot
Number of steps for evaluation
plotparam
gen plotparam(const gen & f, const gen & vars, const vecteur & attributs,
int densityplot, double function_xmin, double function_xmax,
double function_ymin, double function_ymax,
double function_tmin, double function_tmax,
double function_tstep, const gen & equation,
const gen & parameq, const context * contextptr);
Creates parametric plots in 2D.
plotimplicit
gen plotimplicit(const gen& f_orig, const gen& x, const gen & y,
double xmin, double xmax, double ymin, double ymax,
int nxstep, int nystep, double eps,
const vecteur & attributs, bool unfactored,
bool cklinear, const context * contextptr, int ckgeo2d);
Plots implicit equations in 2D.
The implicit equation f(x,y)=0
plotfield
gen plotfield(const gen & xp, const gen & yp,
const gen & x, const gen & y,
double xmin, double xmax, double xstep,
double ymin, double ymax, double ystep,
double scaling, vecteur & attributs,
bool normalize, const context * contextptr);
Plots a vector field.
Scaling factor for vectors
Whether to normalize vectors
plotcontour
gen plotcontour(const gen & f0, bool contour, GIAC_CONTEXT);
Creates contour plots of a function.
Whether to show contour lines
plotseq
gen plotseq(const gen& f, const gen& x, double x0,
double xmin, double xmax, int niter,
const vecteur & attributs,
const context * contextptr, bool print);
Plots a sequence (cobweb plot).
3D Plotting Functions
plotparam3d
gen plotparam3d(const gen & f, const vecteur & vars,
double function_xmin, double function_xmax,
double function_ymin, double function_ymax,
double function_zmin, double function_zmax,
double function_umin, double function_umax,
double function_vmin, double function_vmax,
bool clrplot, bool f_autoscale,
const vecteur & attributs,
double ustep, double vstep,
const gen & eq, const vecteur & eqvars,
GIAC_CONTEXT);
Creates parametric 3D plots.
Parametric equation(s) [x(u,v), y(u,v), z(u,v)]
Parameter variables [u, v]
Minimum u parameter value
Maximum u parameter value
Minimum v parameter value
Maximum v parameter value
Step size for u parameter
Step size for v parameter
Whether to automatically scale the plot
plotimplicit (3D)
gen plotimplicit(const gen& f_orig,
const gen& x, const gen & y, const gen & z,
double xmin, double xmax,
double ymin, double ymax,
double zmin, double zmax,
int nxstep, int nystep, int nzstep,
double eps, const vecteur & attributs,
bool unfactored, bool cklinear,
const context * contextptr);
Plots implicit equations in 3D.
The implicit equation f(x,y,z)=0
Utility Functions
ticks
vecteur ticks(double xmin, double xmax, bool bounds);
Generates tick marks for axes.
Whether to include boundary values
Vector of tick positions with simple decimal representation
plot_array
gen plot_array(const std::vector<std::vector<double>> & fij,
int imax, int jmax,
double xmin, double xmax, double dx,
double ymin, double ymax, double dy,
const vecteur & lz, const vecteur & attributs,
bool contour, int pal, GIAC_CONTEXT);
Plots a 2D array of values.
fij
std::vector<std::vector<double>>
2D array of function values
Whether to create contour plot
colormap functions
bool is_colormap_index(int pal);
bool is_colormap_cyclic(int pal);
int colormap_color(int pal, double t, GIAC_CONTEXT);
bool colormap_color_rgb(int pal, double t, int &c, int &r, int &g, int &b,
GIAC_CONTEXT);
Colormap utility functions for customizing plot colors.
Value between 0 and 1 to map to color
Global Variables
extern double gnuplot_xmin, gnuplot_xmax;
extern double gnuplot_ymin, gnuplot_ymax;
extern double gnuplot_zmin, gnuplot_zmax;
extern double gnuplot_tmin, gnuplot_tmax, gnuplot_tstep;
extern double global_window_xmin, global_window_xmax;
extern double global_window_ymin, global_window_ymax;
extern double x_tick, y_tick;
extern bool autoscale;
extern int PARAM_STEP;
extern int gnuplot_pixels_per_eval;
Global variables controlling plot ranges and behavior.
See Also