Custom graphs
Moderator: Administrator
Custom graphs
I have a stock variable in my model, which represents a company's earnings. The time step of the model is a month, and after every 12 month the earnings start again from 0. Now i would like to have a graph which shows only every 12th value of my variable, i.e. the final earnings of a year. Is there any possibility to do this in Sable?
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: Custom graphs
Yes. Display the graph property page, select "Advanced 1" and click the "Settings" button. Now click "Paging" and you can set the number of points per page.
You will need to create a couple of buttons to move between the pages once the graph is displayed.
You will need to create a couple of buttons to move between the pages once the graph is displayed.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Custom graphs
First of all thank you for the quick answer. I tried what you describe and it works. However, it is not exactly what I was looking for. Using pages I can display the same number of values at each page. doing so there are two problems:
1. The graph starts with the initialisation time 0 and not the first time step. This means that defining 12 values for each page, the first starts with 0 and ends with 11, which is not the final value of the year. Defining 13 values for each page, the first page is fine, however, the second starts with 13 (which is fine) and ends with 25, which ist not the final, i.e. 12th, value of the second year.
2. It would be better to have a graph showing the final results for each year at a glance. Assuming a simulation time of 60 months, this would mean that i have a graph with 5 values only (12th, 24th, 36th, etc.)
I tried to attach a picture of this looks in Excel, but it didn't work (tried with bmp and emf).
Thanks in advance for any help.
Adam
1. The graph starts with the initialisation time 0 and not the first time step. This means that defining 12 values for each page, the first starts with 0 and ends with 11, which is not the final value of the year. Defining 13 values for each page, the first page is fine, however, the second starts with 13 (which is fine) and ends with 25, which ist not the final, i.e. 12th, value of the second year.
2. It would be better to have a graph showing the final results for each year at a glance. Assuming a simulation time of 60 months, this would mean that i have a graph with 5 values only (12th, 24th, 36th, etc.)
I tried to attach a picture of this looks in Excel, but it didn't work (tried with bmp and emf).
Thanks in advance for any help.
Adam
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: Custom graphs
The simple answer is to have initial time = 1 rather than zero if you want a year of data on each graph.
It might be possible to do the summary graph (I'm on a Mac at the moment so cannot test it). Create a new variable in your model called "year summary".
year summary = if then else ( modulo(time,12) = 0 , graphing var, :NA: )
Now try showing that. The :NA: values shouldn't be shown so just the year end points will show up.
It might be possible to do the summary graph (I'm on a Mac at the moment so cannot test it). Create a new variable in your model called "year summary".
year summary = if then else ( modulo(time,12) = 0 , graphing var, :NA: )
Now try showing that. The :NA: values shouldn't be shown so just the year end points will show up.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559