Page 1 of 1

How do I get rid of extra years on my x-axis when using the PLOT-command?

Posted: Fri Jun 16, 2017 10:07 am
by Mose_5000
I would like to plot a variable between 1994 and 2016, but the x-axis from the PLOT-command runs from 1990 to 2020.

In Gnuplot, you write "set xrange [1994: 2016]", which is also possible if the "dump"-option is used, but how is it done directly in the PLOT-command?

/Mose

Re: How do I get rid of extra years on my x-axis when using the PLOT-command?

Posted: Mon Aug 07, 2017 9:27 am
by MOL
In the current development version, GEKKO 2.3.5, the string you mention is used as follows, where the variable to be plotted is 'fcp':
Plot<1994 2016 plotcode='Set xrange [1994:2016]'> fcp;

It also works with GEKKO v.2.2.5.
/MOL