summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--matlab_usage_source/index.t2t47
1 files changed, 47 insertions, 0 deletions
diff --git a/matlab_usage_source/index.t2t b/matlab_usage_source/index.t2t
index 0a20402..0cd13e5 100644
--- a/matlab_usage_source/index.t2t
+++ b/matlab_usage_source/index.t2t
@@ -47,6 +47,21 @@ No our plot is nice and pretty.
[simple_unlabeled_plot.png]
+= Fixing the range of the axes =
+
+Have a look at above plot. We see that one of the axes (y) does not contain
+origin point (y=0). Such plots are very common in finances and design to fool a
+reader, but they are generally not acceptable in scientific reports.
+
+The fix is very easy. Note that we are actually sending a vector [0,5] to the
+ylim function
+``` ylim([0,5])
+
+Now our plot is good to present
+
+[simple_labeled_and_proper_limits_plot.png]
+
+
= Plotting with error bars =
Let's open a new window for the plot
@@ -66,4 +81,36 @@ ylabel('Current (A)')
[errorbar_plot.png]
+= Fixing plots font size =
+
+Honestly Matlab is not the best tool to do presentation quality plots, it requires a quite a bit of messing with their GUI. But at least for quick font size fix do the following. This looks a bit like magic spell.
+```
+fontSize=24;
+set(gca,'FontSize',fontSize );
+
+errorbar(I,V,dV)
+title('Dependence of voltage on current')
+xlabel('Voltage (V)')
+ylabel('Current (A)')
+```
+
+[errorbar_with_large_font_plot.png]
+
+
+= Saving you matlab plots =
+
+Well it nice to have matlab plots. But as soon as you close matlab they will go away.
+How to save them for a future use? Actually, quite easy.
+For png output do
+``` print('V_vs_I.png')
+
+or if you need a pdf (matlab usually make very bad pdfs)
+``` print('V_vs_I.pdf')
+
+Make sure you read documentation for 'print' command there are some useful parameters.
+
+
+
+
+