* Create the graphics workspace if necessary, or add the
* plot to the already-existent workspace
*/
if (plot == NULL)
return;
nc = plot->row_size;
nr = plot->size/plot->row_size;
if (end_point_x > nc ||
begin_point_x > nc ||
step_size_x > nc ||
(end_point_x < begin_point_x &&
end_point_x > 0 && begin_point_x >0) ||
step_size_x == 0.0 ||
end_point_y > nr ||
begin_point_y > nr ||
step_size_y > nr ||
(end_point_y < begin_point_y &&
end_point_y > 0 && begin_point_y >0) ||
step_size_y == 0.0)
{
freeplot(plot);
mesg = xvf_strcpy("The Begin point, End point or Step Size was specified incorrectly.\n\nPlease check the Begin point, End point and Step Size, and Plot Data again");
"start_cmd_plot_3D: Warning, This plot requires at least 2 rows and columns\nfor specified plot type. Resetting plot type to 3D\n",
"run_input_function", NULL);
plot_type =
plot->plot_type = PLOT_3D;
}
if (end_point_x > nc ||
begin_point_x > nc ||
step_size_x > nc ||
(end_point_x < begin_point_x &&
end_point_x > 0 && begin_point_x >0) ||
step_size_x == 0.0 ||
end_point_y > nr ||
begin_point_y > nr ||
step_size_y > nr ||
(end_point_y < begin_point_y &&
end_point_y > 0 && begin_point_y >0) ||
step_size_y == 0.0)
{
freeplot(plot);
mesg = xvf_strcpy("The Begin point, End point or Step Size was specified incorrectly.\n\nPlease check the Begin point, End point and Step Size, and Plot Data again");