diff options
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 |