Script para gnuplot: mudanças entre as edições

De Física Computacional
Ir para navegação Ir para pesquisar
(Criou página com 'Script do Gnuplot para gerar as imagens. <source lang='gnuplot'> # Reset previously sessions reset # Data input file = "../data/output.dat" # Statistics about the data stat...')
 
Sem resumo de edição
Linha 2: Linha 2:


<source lang='gnuplot'>
<source lang='gnuplot'>
# Reset previously sessions
# Reset previous sessions
reset
reset



Edição das 18h01min de 30 de abril de 2022

Script do Gnuplot para gerar as imagens.

# Reset previous sessions
reset

# Data input
file = "../data/output.dat"

# Statistics about the data
stats file name "A"

# Set range of plots
set xrange [A_min_x:A_max_x]    # x-axis
set yrange [-1.2:1.2]           # y-axis

# Customize the output 
set term pngcairo size 800, 600 enhanced font "Arial,10" fontscale 1.0

# Title and labels
set title "FPUT - Descolamento vertical" font "Oswald,18"
set xlabel "Posição (x)" font ",12"
set ylabel "Altura (y)" font ",12"

# Total number of frames
tmax = int(A_blocks-1)

# Text position in y
text_y = (A_max_x-A_min_x)*0.05

# Loop
do for [i=0:tmax] {  
    # Print: current_frame total_frame
    print i,tmax
    # Output file format
    outfile = sprintf("../img/".dir."/fput%d.png", i)
    set output outfile
    # Time
    unset label
    set label "Iteração: ".i at text_y, 1 font ",10"
    # Plot
    plot file index i with points pt 7 ps 2 lc rgb 'black' notitle
    }