Download User Guide Version 6.0 - RWTH Aachen University
Transcript
Chapter 6 gnuplot 6.2. Plotting data and fitting curves The possibilities of plotting MICRESS® data and fitting curves will be explained with the help of the “Grain Growth” example. This example is stored in the MICRESS® installation directory. Let's consider that you would like to plot the average grain radius over time. This information can be found in the Grain_Growth_.TabK -file (see Figure 6.3.) in the “Grain Growth” result directory. The details for this procedure are explained in fig. 6.2: Fig 6.2 Command-line input for plotting data and fitting curves First specify the path of the respective result file. Then label the axes of the desired plot. If you do not wish to have a legend, use the command “set nokey”. Since this is a 2D plot, only labels for the X and the Y axis are necessary. This is done with the commands set xlabel and set ylabel, resp. The time t for microstructure evolution will be plotted along the X-axis and the grain radius in micrometers will be plotted along the Y-axis. The columns of the data to be plotted are specified by typing e.g. “plot "Grain_Growth_TabK.txt" u 1:2 w l lw 2” where “u 1:2” indicates, that column 2 of the table (see fig 6.2) shall be plotted over column 1 by using a line (w l “with line”) and the line width (lw) shall be 2. MICRESS® User Guide Volume III: Post-Processing gnuplot Command-Line gnuplot> cd 'C:\Desktop\Results_Grain_Growth gnuplot> set nokey gnuplot> set xlabel "t" gnuplot> set ylabel "R/µm" gnuplot> plot "Grain_Growth_TabK.txt" u 1:2 w l lw 2 …. gnuplot> f(x) = R0 + k*x**m gnuplot> R0=1 gnuplot> k=1 gnuplot> m=1 gnuplot> fit f(x) "Grain_Growth_TabK.txt" u 1:2 via R0,k,m gnuplot> replot f(x) w lines gnuplot> print "R0:", R0, "µm" gnuplot> print "k:", k gnuplot> print "m:", m gnuplot> pause -1 48/70