, Data analysis based on open-source software

Source: Internet
Author: User

Install the following software on the Linux Character System

1. Install Python + numpy + scipy + matplotlib (enthought succeeded)

2. Install R (successful)

3. Install gnuplot (installed successfully)

4. Install GSL

1. Installation File

Epd_free-7.3-2-rh5-x86_64.sh

Successfully installed test script

 

#-*-Coding: GBK -*-
######################################## #################################
# Copyright (c) 2013 All Rights Reserved.
#
# File name: A. py
# Creator: Liu Yu finallyly

# Creation date: January 1, January 27, 2013
# Description:
#
# Secondary note:
#
######################################## #################################
#! /Usr/bin/Python
# Please add your code here!
Import matplotlib
Matplotlib. Use ('authorization') # Must be before importing matplotlib. pyplot or pylab!
Import matplotlib. pyplot as PLT
Import numpy as NP
Fig = PLT. Figure ()
X = NP. linspace (100 );
PLT. Plot (x, NP. Sin (x ));
Fig. Hold ();
X = NP. linspace (100 );
PLT. Plot (x, 0.5 * NP. Cos (2 * X ));
PLT. Title ("A matplotlib plot ");
PLT. Text (1,-0.8, "Cos func ");
PLT. ylim (-1.1, 1.1 );
Fig.savefig('temp.png ')

Run: liuyu :~ /Mytars/epd_free-7.3-2-rh5-x86_64/bin/workbench $../python2.7 A. py

2. installation to participate in http://blog.sina.com.cn/s/blog_61f013b80100yhef.html, I installed the license is R-2.15.2

2 installation successful

 

3. The installed version is gsl-1.9, the installation location is liuyu :~ /Gsl4. after installing the above four open source libraries, my. bashrc content is as follows:

Export Path = $ path:/home/liuyu/mytars/epd_free-7.3-2-rh5-x86_64/bin
Export Path = $ path:/home/liuyu/mytars/R-2.15.2/bin
Export r_home =/home/liuyu/mytars/R-2.15.2/bin/R
Export r_libs =/search/liuyu/mytar S/R-2.15.2/Library
Export LD_LIBRARY_PATH =$ {r_home}/lib :$ {LD_LIBRARY_PATH}
Export LD_LIBRARY_PATH =/usr/local/lib: $ {LD_LIBRARY_PATH}
Export LD_LIBRARY_PATH =/home/liuyu/GSL/lib :$ {LD_LIBRARY_PATH}

5. Install software by source code

Tar-xzvf source.tar.gz

CD Source

./Configure -- prefix = dir // specify the installation directory

Make

Make install

Uninstall make uninstall

6.ProgramCall the GSL Library (use automake for compilation)

Contents of makefile. AM

Include $ (top_srcdir)/common. mk
 
Bin_programs =
Lib_libraries =
Ib_ltlibraries =

Bin_programs + = test
Includes =-I/search/liuyu/GSL/include
Test_sources = test. cpp
Test_ldadd =/home/liuyu/GSL/lib/libgsl. So/home/liuyu/GSL/Li
B/libgslcblas. So
Test_ldflags =-static-libtool-libs

Source code of test. cpp

========================================================== ======================================= * Copyright (c) 2013 All Rights Reserved. ** file name:. CPP * Creator: Liu Yu finallyly * creation Date: July 15, January 27, 2013 * Description: * slave Note: * Update log: * ===================================================== =======================================* // please add your code here! # Include <stdio. h> # include "GSL/gsl_vector.h" # include "GSL/gsl_matrix.h" # include "GSL/gsl_blas.h" # include "GSL/gsl_linalg.h" int main () {Double R; gsl_vector * a, * B, * s, * t; gsl_matrix * m, * V; A = gsl_vector_alloc (2); B = gsl_vector_alloc (2); gsl_vector_set (A, 0, 1.0); gsl_vector_set (A, 1, 2.0); gsl_vector_set (B, 0, 3.0); gsl_vector_set (B, 1, 6.0); gsl_vector_add (A, B ); gsl_vector_fprintf (stdout, A, "% F"); gsl_blas_ddot (a, B, & R); fprintf (stdout, "% F \ n", R ); S = second (2); t = gsl_vector_alloc (2); M = gsl_matrix_alloc (1.0); V = gsl_matrix_alloc (); gsl_matrix_set (M ); gsl_matrix_set (M, 2.0, 0.0); gsl_matrix_set (M, 3.0,); gsl_matrix_set (M,); gsl_linalg_sv_decomp (M, V, S, T ); values (stdout, S, "% F"); gsl_vector_free (a); gsl_vector_free (B); gsl_vector_free (s); gsl_vector_free (t); gsl_matrix_free (m ); gsl_matrix_free (V); Return 0 ;}

Running result:

 

Install gnuplot 1. download the wxGTK-2.8.12-i486-1alien.tgz, unzip it and copy the libwx_gtk2u_richtext-2.8.so.0.8.0 to/usr/local/lib (the reason for putting it here is because/etc/lD. so. conf specifies this directory as the functional directory of the Dynamic Link Library) 2. then enter the source code and install my gnuplotsource code with the rootid as gnuplot-4.6.rc1.tar.gz 3. then configure path export Path = $ path: gnuplot installation directory 4 in bashrc. call the file name plot. GP contains the following content: 1 plot sin (X)
2 Set grid
3 set xlabel "X"
4 set ylabel "Y"
5 set terminal PNG
6 set output "plot.png"
7 replotgnuplot plog.gpwill download plot.png in the previous example

F = scan (file = "f3.txt ");
Quantile (F, 0.01 );
# PNG (file = "myplot2.png", BG = "Transparent ");
# Boxplot (f );
Fivenum (f );
Summary (f );

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.