#include <TicsCommand.h>


TicsCommand :: TicsCommand() :
	name("Tics")
{
}


string TicsCommand :: execute(Projection *projection, Profile *profile)
{
	Gnuplot * gplt = projection->projection();

	switch ( profile->ticMarks() )
	{
	case 0:
		gplt->cmd ("set xtics autofreq");
		gplt->cmd ("set ytics autofreq");
		break;

	case 1:
		gplt->cmd ("set xtics (%f, %f)", projection->xmin(), projection->xmax());
		gplt->cmd ("set ytics (%f, %f)", projection->ymin(), projection->ymax());
		break;

	case 2:
		gplt->cmd ("unset xtics");
		gplt->cmd ("unset ytics");
		break;
	}

	return "";
}


