Decreasing scale on graphs
4 views (last 30 days)
Show older comments
I wish to graph Time Decay for an option price from 1 year to almost 1 day. The graph generated by MATLAB scales from 0 to 1 and I need 1 to 0.
Interval = 1/252;
Times = 1:-Interval:Interval;
[TDCall TDPut] = blsdelta(S0,K,r,Times,Sigma);
Jan on 11 Mar 2011
Can you change the values of the time?
plot(1 - Times, TDCall);
Perhaps FLIPLR is wanted to reorder TDCall?
Walter Roberson on 11 Mar 2011
Okay, this is going to be a hack, but it'll get the job done for now:
set(gca, 'XTickLabel', -get(gca, 'XTick'))
Tested, and it works.
Ned Gulley on 11 Mar 2011
Is this what you're looking for?
Find more on Specifying Target for Graphics Output in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!