summaryrefslogtreecommitdiff
path: root/loading-data-from-files/quickref.tex
diff options
context:
space:
mode:
authorNishanth Amuluru2010-10-11 22:44:21 +0530
committerNishanth Amuluru2010-10-11 22:44:21 +0530
commit0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03 (patch)
tree23e39471c705058c10961ff465517a664abbef43 /loading-data-from-files/quickref.tex
parentc777a70b51353182bcfadaaff9deb2b9d09cf9a2 (diff)
parent81a76e18a1b11c9565ee198d7ae58bd49d9b3acb (diff)
downloadst-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.tar.gz
st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.tar.bz2
st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.zip
merged
Diffstat (limited to 'loading-data-from-files/quickref.tex')
-rw-r--r--loading-data-from-files/quickref.tex16
1 files changed, 10 insertions, 6 deletions
diff --git a/loading-data-from-files/quickref.tex b/loading-data-from-files/quickref.tex
index b26d168..c3bbe95 100644
--- a/loading-data-from-files/quickref.tex
+++ b/loading-data-from-files/quickref.tex
@@ -1,8 +1,12 @@
-Creating a linear array:\\
-{\ex \lstinline| x = linspace(0, 2*pi, 50)|}
+\textbf{Loading data from files}
+
+\lstinline|loadtxt('filename')| returns the columns of file in one
+sequence.
+
+\lstinline|x, y = loadtxt('filename', unpack=True)| to obtain a file
+with 2 columns in separate sequences.
+
+\lstinline|loadtxt('filename', delimiter=';')|, if the file has
+columns separated by ';' instead of spaces/tabs.
-Plotting two variables:\\
-{\ex \lstinline| plot(x, sin(x))|}
-Plotting two lists of equal length x, y:\\
-{\ex \lstinline| plot(x, y)|}