je veux exporter en png un fichier GNUPlot main.gp
# phase frequency response
A(w) = 1/(1+{0,1}*w/w0)
w0 = 100
set dummy w
set grid
set key default
set offsets 0, 0, 0, 0
unset log y
set logscale x
set xlabel "w (radians)"
set xrange [1 : 10000.0]
set title "Phase Frequency Response"
set ylabel "Phase of A(w) (degrees)"
plot 180/pi*arg(A(w))
j'ai pensé ajouter au début
set terminal png
je lance
gnuplot main.gp > main.png
et ça roule
mais je voudrais garder mon fichier main.gp intact
donc je me suis dis qu'il faudrait concatener la chaine
set terminal png
avec le fichier : main.gp
puis lancer gnuplot
Je voudrais aussi dans la mesure du possible éviter la création de
fichiers temporaires...
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Khanh-Dang
mais je voudrais garder mon fichier main.gp intact donc je me suis dis qu'il faudrait concatener la chaine
set terminal png
avec le fichier : main.gp
puis lancer gnuplot
Si je comprends bien, tu aimerais que gnuplot lise le fichier main.gp et écrive une sortie au format png, sans pour autant devoir ajouter « set terminal png » au fichier main.gp.
Je propose alors une solution : { echo "set terminal png"; cat main.gp; } | gnuplot > sortie.png
mais je voudrais garder mon fichier main.gp intact
donc je me suis dis qu'il faudrait concatener la chaine
set terminal png
avec le fichier : main.gp
puis lancer gnuplot
Si je comprends bien, tu aimerais que gnuplot lise le fichier main.gp et
écrive une sortie au format png, sans pour autant devoir ajouter « set
terminal png » au fichier main.gp.
Je propose alors une solution :
{ echo "set terminal png"; cat main.gp; } | gnuplot > sortie.png
mais je voudrais garder mon fichier main.gp intact donc je me suis dis qu'il faudrait concatener la chaine
set terminal png
avec le fichier : main.gp
puis lancer gnuplot
Si je comprends bien, tu aimerais que gnuplot lise le fichier main.gp et écrive une sortie au format png, sans pour autant devoir ajouter « set terminal png » au fichier main.gp.
Je propose alors une solution : { echo "set terminal png"; cat main.gp; } | gnuplot > sortie.png
Daniel Déchelotte
| > mais je voudrais garder mon fichier main.gp intact | > donc je me suis dis qu'il faudrait concatener la chaine | > | > set terminal png | > | > avec le fichier : main.gp | > | > puis lancer gnuplot | | [...] | | Je propose alors une solution : | { echo "set terminal png"; cat main.gp; } | gnuplot > sortie.png
| > mais je voudrais garder mon fichier main.gp intact
| > donc je me suis dis qu'il faudrait concatener la chaine
| >
| > set terminal png
| >
| > avec le fichier : main.gp
| >
| > puis lancer gnuplot
|
| [...]
|
| Je propose alors une solution :
| { echo "set terminal png"; cat main.gp; } | gnuplot > sortie.png
| > mais je voudrais garder mon fichier main.gp intact | > donc je me suis dis qu'il faudrait concatener la chaine | > | > set terminal png | > | > avec le fichier : main.gp | > | > puis lancer gnuplot | | [...] | | Je propose alors une solution : | { echo "set terminal png"; cat main.gp; } | gnuplot > sortie.png