graph of monthly vars w/decimal year x-axis

Use this forum to post Vensim related questions.
Post Reply
mike
Senior Member
Posts: 56
Joined: Fri May 21, 2004 12:53 am

graph of monthly vars w/decimal year x-axis

Post by mike »

I tried to do this but the graph came up empty when I tried to use decimal year as the graph's x-axis; it works fine using time (monthly ) as x-axis ?????? how can I graph monthly variables with x-axis showing 1960 .... 1970 .... 1980 ....
Administrator
Super Administrator
Posts: 4831
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

The attached zip contains a model. I have calculated decimal year in two ways (using a time base function and calculating as a normal parameter).

There is also a custom graph within this model that has the x axis set to be "Decimal Year".

You can also change the time base in the vensim control panel, that way all graphs will show the decimal year.

Let us know how you get on.

Tony.
Attachments
Month-Year Graphs.zip
(3.02 KiB) Downloaded 631 times
mike
Senior Member
Posts: 56
Joined: Fri May 21, 2004 12:53 am

thank you; but I ran into a problem downloading

Post by mike »

WinZip said "Cannot open file; it does not appear to be a valid archive; if you downloaded the file; try again " or something to that effect. Never encountered this before ? I tried downloading again to no avail. Regardless ; appreciate the guidance. If I can help; let me know. Regards, Mike

[Edited on 8-20-2004 by mike]
Wilson
Administrator
Posts: 51
Joined: Thu Mar 06, 2003 5:05 am

Post by Wilson »

Create a new variable called YEAR, which has the equation:

YEAR = TIMEBASE(TIME, 0.08333)

You will then be able to select the X axis time unit as months or years from the control panel icon on the Time Axis tab.

You might also need to change INITIAL TIME to reflect the starting year equivalent.

Hope this helps
mike
Senior Member
Posts: 56
Joined: Fri May 21, 2004 12:53 am

thank you

Post by mike »

I forgot about the Control Panel setting. Appreciate the guidance! Good day. Mike
Post Reply