plt hide axis ticks
To hide axis ticks in a C plot, you can use the axis()
function with the ticks
parameter set to 0
. Here's an example:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "gnuplot_i.h"
int main()
{
gnuplot_ctrl *h;
h = gnuplot_init();
gnuplot_cmd(h, "set xtics 0");
gnuplot_cmd(h, "set ytics 0");
gnuplot_cmd(h, "set border 0");
double x[] = {0, 1, 2, 3, 4, 5};
double y[] = {0, 1, 2, 3, 4, 5};
gnuplot_plot_xy(h, x, y, 6, "Plot");
gnuplot_close(h);
return 0;
}
This code initializes a gnuplot control structure, sets the x and y ticks to 0, sets the border to 0 to hide the axis lines, and plots a simple XY graph with some data points.