diff options
author | Hunter Rew <hbrew@email.wm.edu> | 2014-04-26 18:03:44 -0400 |
---|---|---|
committer | Hunter Rew <hbrew@email.wm.edu> | 2014-04-26 18:03:44 -0400 |
commit | 405a890c646f9be5c51d17b9b3f8c1153de42e42 (patch) | |
tree | ad8a0e930cc52ab4fbc4738c1fc74571238fbd67 /view | |
parent | 02fd142d42e9b50ebb49a6124bc3141be95b3e23 (diff) | |
parent | 0f8b12cff819c16594441158e9d2086941ad6047 (diff) | |
download | eit_filter_simulations-405a890c646f9be5c51d17b9b3f8c1153de42e42.tar.gz eit_filter_simulations-405a890c646f9be5c51d17b9b3f8c1153de42e42.zip |
Fixed axis limits
Diffstat (limited to 'view')
-rw-r--r-- | view/plotSimulation.m | 3 | ||||
-rw-r--r-- | view/plotSimulations.m | 17 |
2 files changed, 15 insertions, 5 deletions
diff --git a/view/plotSimulation.m b/view/plotSimulation.m index d494287..a741333 100644 --- a/view/plotSimulation.m +++ b/view/plotSimulation.m @@ -1,5 +1,8 @@ function h = plotSimulation(detunings2, absorptions) h = plot(detunings2, absorptions); + xlabel('2-photon Detuning') + ylabel('Absorption') + title('Absorption Vs 2-photon Detuning') end
\ No newline at end of file diff --git a/view/plotSimulations.m b/view/plotSimulations.m index 12273af..6197c75 100644 --- a/view/plotSimulations.m +++ b/view/plotSimulations.m @@ -1,11 +1,18 @@ -function plotSimulations(widths, absorptions, drives) +function plotSimulations(drives, y1, y2) - loglog(drives, widths) + loglog(drives, y1) hold all - loglog(drives, absorptions) + loglog(drives, y2) xlabel('Drive Intensity (log scale)') ylabel('(log scale)') - title('Width and Absorption Vs Drive Intensity') - legend('Width', 'Absorption') + title(sprintf('%s and %s Vs Drive Intensity', inputname(2), inputname(3))) + legend(inputname(2), inputname(3)) + + % When plotting contrast, the y-axis upper limit is the maximum value (1) + % Since contrast approaches one quickly and becomes a practically straight line, it's hard to see + % Here we increase the y-axis upper limit to prevent the contrast line from overlapping with the axis + limits = ylim; + ylim([limits(1), limits(2)*10]); + hold off end
\ No newline at end of file |