function out = tilemap_plot(datapath)

    cutp = 0.5;
    cutm = 0.5;
    
    data = load(datapath, '-ascii');
    len = size(data,1);


    mmax = max(data(:,2));
    mmin = min(data(:,2));
    if(mmax-mmin > 1e-20)
        normy = 1-(data(:,2)-mmin)/(mmax-mmin);
    else
        normy = data(:,2);
    end
    plot(data(:,1), normy, 'k.');
    
    hold on
        offset = 2;    
        plot(data(:,1), data(:,3)+offset, 'b.');
        plot(data(:,1), cutp*ones(len,1)+offset, 'b-.');
    
        offset = 4;
        mmax = max(data(:,4));
        mmin = min(data(:,4));
        if(mmax-mmin > 1e-20)
            normy = 1-(data(:,4)-mmin)/(mmax-mmin);
        else
            normy = data(:,4);
        end
        plot(data(:,1), normy+offset, 'm.');
    
        offset = 6;
        plot(data(:,1), data(:,5)+offset, 'r.');
        plot(data(:,1), cutm*ones(len,1)+offset, 'r-.');

       
        xlabel('genomic coordinate');
        text(data(1,1), 0.8, 'TileMap: probe level test-statistics');
        text(data(1,1), 2.8, 'TileMap(HMM): HMM posterior probability');
        text(data(1,1), 4.8, 'TileMap(MA): 1-standardized mean scan statistics');
        text(data(1,1), 6.0,'TileMap(MA): local FDR');
    hold off