Donnerstag, 23. Oktober 2014
Latex (tikz) emphasize part of graphic
http://tex.stackexchange.com/questions/181098/semitransparent-outside-clipped-region
gnuplot loop over all blocks in datafile
If you have a data file for gnuplot with indexable blocks (two blank lines between data blocks) e.g.:
and want to plot each plot individually but with the same plot command, you can simply use the gnuplot 4.6 stats function to get the number of blocks and loop over the blocks in a combined command:
0 1 1 2 0 1.5 1 2.5 0 2.0 2 3.0
and want to plot each plot individually but with the same plot command, you can simply use the gnuplot 4.6 stats function to get the number of blocks and loop over the blocks in a combined command:
#!/usr/bin/gnuplot file="data.dat" stats file plot for [i=0:STATS_blocks-2] file index i w l ls i+1PS: if you only have one blank line between data blocks you need to use the every command:
#!/usr/bin/gnuplot file="data.dat" stats file plot for [i=0:STATS_blank] file every :::i::i w l ls i+1
Mittwoch, 22. Oktober 2014
histogram with gnuplot
if you want to plot a histogram with gnuplot, just use the raw data in "data.dat" and plot the data via the following command:
the data is transformed into a histogram via the bin function and then plotted via the plot with boxes command.
the result looks something like that:
the data is transformed into a histogram via the bin function and then plotted via the plot with boxes command.
#!/usr/bin/gnuplot file="data.dat" binwidth=1.0 bin(x,width)=width*floor(x/width) set style fill solid 0.5 plot file u (bin($1,binwidth)):(1.0) smooth freq with boxes ls 1 t 'total'
the result looks something like that:
Montag, 13. Oktober 2014
zoomed inlets in latex with tikz' inlet library
http://www.texample.net/tikz/examples/feature/spy-library/
Freitag, 10. Oktober 2014
remove zero sized file
To delete zero sized files in bash you can simply use an if clause with you can put in a loop.
First the if clause
and finally the full loop:
if [ ! -s file ] ; then rm file fi
and finally the full loop:
for file in * do if [ ! -s $file ] ; then rm $file fi done
Abonnieren
Posts (Atom)