xy plot; defining x as quarters (time)

Dear All,

My data is quarterly and I have date_index matrix (120*1) as 1986-07, 1986-10, 1987-01 and so on.

I would like to put the matrix into horizontal axis while drawing XY plot but there is a confliction with line 98 from pxy.src file. What can be the problem? How can I change date_index to fix it? (Relevant part of the code is below.)


xindex = date_index;

xy(xindex, tvp_coef[.,1]~conf_int_beta0_low~conf_int_beta0_high);

Thank you for taking time.

2 Answers


I think you will be much better off using plotTS, rather than the xy function from the deprecated PQG graphics.

//declare myPlot to be a plotControl structure
//and fill with default values
struct plotControl myPlot;
myPlot = plotGetDefaults("xy");

plotSetTitle(&myPlot, "beta0t");

//Specify quarterly data
freq = 4;
first_date = 198607;

plotTS(myPlot, first_date, freq, tvp_coef[.,1]~conf_int_beta0_low~conf_int_beta0_high);

You can modify this to use Latex in the title and also control the styling of the date labels.


I'm currently using 9.0 version of Gauss since the code i tried to extend is written in that version (libraries etc.). I guess due to the older version i get a syntax error in "struct plotControl myPlot" line, while trying your suggestion. Do you have any idea about how can i adapt it? Thank you for taking time.

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy