From 563330e918440fd6ef34ffac88706c0e19a0ba08 Mon Sep 17 00:00:00 2001 From: Matt Argao Date: Wed, 20 Feb 2013 15:52:13 -0500 Subject: Added ability to set y-max (stabiility) in energy vs. stability graph. --- energy_vs_stability.m | 11 ++++++----- stability_visualization.m | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/energy_vs_stability.m b/energy_vs_stability.m index da03f89..25e0d06 100644 --- a/energy_vs_stability.m +++ b/energy_vs_stability.m @@ -1,4 +1,4 @@ -function [] = energy_vs_stability( possible_energy, stability, index ) +function [] = energy_vs_stability( possible_energy, stability, index, stability_max ) %ENERGY_VS_STABILITY Summary of this function goes here % Detailed explanation goes here @@ -15,16 +15,17 @@ function [] = energy_vs_stability( possible_energy, stability, index ) figure(n+1) textCell = arrayfun(@(x,y) sprintf('(%3.2f, %3.2f)',x,y),energy,fixed_stability,'un',0); - scatter(energy,fixed_stability,25,c,'filled'); - xlabel('Energy'); - ylabel('Stability'); + scatter(energy,fixed_stability,25,c,'filled') + xlabel('Energy') + ylabel('Stability') + ylim([0,stability_max]) dx =0.000000005; dy =0.000000005; for i = 1:n n_solution = num2str(i); - text(energy(i)+dx, fixed_stability(i)+dy, n_solution, 'FontSize',12); + text(energy(i)+dx, fixed_stability(i)+dy, n_solution, 'FontSize',10); end % for i = 1:n diff --git a/stability_visualization.m b/stability_visualization.m index 1bd3ba3..ba0a8de 100644 --- a/stability_visualization.m +++ b/stability_visualization.m @@ -13,6 +13,7 @@ for i=1:n str_a = ['Area under curve = ', num2str(area)]; title({'Solution Stability'; str_n; str_a}); stability(i) = area; + end end -- cgit v1.2.3