Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4415 > unrolled thread
| Started by | "hugocoolens@gmail.com" <hugocoolens@gmail.com> |
|---|---|
| First post | 2021-07-08 07:30 -0700 |
| Last post | 2021-07-13 04:53 -0700 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
How to produce screenplot and pslatex-plot with one batch file "hugocoolens@gmail.com" <hugocoolens@gmail.com> - 2021-07-08 07:30 -0700
Re: How to produce screenplot and pslatex-plot with one batch file Gavin Buxton <gavinbuxton@gmail.com> - 2021-07-09 08:18 -0700
Re: How to produce screenplot and pslatex-plot with one batch file "hugocoolens@gmail.com" <hugocoolens@gmail.com> - 2021-07-10 02:23 -0700
Re: How to produce screenplot and pslatex-plot with one batch file Gavin Buxton <gavinbuxton@gmail.com> - 2021-07-10 08:07 -0700
Re: How to produce screenplot and pslatex-plot with one batch file "hugocoolens@gmail.com" <hugocoolens@gmail.com> - 2021-07-13 04:53 -0700
| From | "hugocoolens@gmail.com" <hugocoolens@gmail.com> |
|---|---|
| Date | 2021-07-08 07:30 -0700 |
| Subject | How to produce screenplot and pslatex-plot with one batch file |
| Message-ID | <e95b190e-372c-43c2-832e-4ae317cbecddn@googlegroups.com> |
I currently use Gnuplot as follows: I write a batch-file myfile.gp with the following commands in comment #set terminal pslatex size 25cm,17cm monochrome #set output "fileforlatex.tex" I first run the batch file to see if plot is OK on screen, like this gnuplot <myfile.gp --persist If the result seems OK, I edit the original batch file and remove the # such that I have: set terminal pslatex size 25cm,17cm monochrome set output "fileforlatex.tex" The I rerun Gnuplot: gnuplot <myfile.gp I wonder whether it is possible to see the result on screen _and_ produce the fileforlatex.tex at the same time? Here is a trivial example batch file: myfile.gp: #set terminal pslatex size 25cm,17cm monochrome #set output "fileforlatex.tex" plot sin(x) set output kind regards, Hugo
[toc] | [next] | [standalone]
| From | Gavin Buxton <gavinbuxton@gmail.com> |
|---|---|
| Date | 2021-07-09 08:18 -0700 |
| Message-ID | <cff8b4a1-6be9-4fd0-bb7c-89e31c11371en@googlegroups.com> |
| In reply to | #4415 |
Hi I might be misunderstanding your question, but it seems like you want to see the output of your plot when the terminal is tex. I usually use ps or png files and then embed them in latex afterwards, so I would check it using something like: set term post set output 'temp.ps' plot sin(x) set output !gv temp.ps where the last command would open the file using ghostview (the exclamation mark just allows you to run external programs from gnuplot commandline). I don't use tex file directly, but I imagine to view the tex file you would need an external viewer of some kind? Best Gavin
[toc] | [prev] | [next] | [standalone]
| From | "hugocoolens@gmail.com" <hugocoolens@gmail.com> |
|---|---|
| Date | 2021-07-10 02:23 -0700 |
| Message-ID | <1cf904fc-5f50-43c1-880a-d8b6a379d4cdn@googlegroups.com> |
| In reply to | #4416 |
On Friday, July 9, 2021 at 5:18:40 PM UTC+2, Gavin Buxton wrote: > Hi > > I might be misunderstanding your question, but it seems like you want to see the output of your plot when the terminal is tex. I usually use ps or png files and then embed them in latex afterwards, so I would check it using something like: > > set term post > set output 'temp.ps' > plot sin(x) > set output > !gv temp.ps > > where the last command would open the file using ghostview (the exclamation mark just allows you to run external programs from gnuplot commandline). I don't use tex file directly, but I imagine to view the tex file you would need an external viewer of some kind? > > Best > > > Gavin Dear Gavin, Thanks for your answer but this is not what I want. I really want pslatex output as that gives nicer graphs than plain postscript. What I want is a default screen plot _and_ a pslatex-file all in one script. Maybe someone else has a suggestion? kind regards, Hugo
[toc] | [prev] | [next] | [standalone]
| From | Gavin Buxton <gavinbuxton@gmail.com> |
|---|---|
| Date | 2021-07-10 08:07 -0700 |
| Message-ID | <44ade153-21e2-4340-a4cf-8b66e5eb83f8n@googlegroups.com> |
| In reply to | #4417 |
Ah, I think I see now. You could set terminal pslatex size 25cm,17cm monochrome set output "fileforlatex.tex" plot sin(x) set output set term x11 rep and just plot it again to the screen, but it might not look the same in a different terminal.
[toc] | [prev] | [next] | [standalone]
| From | "hugocoolens@gmail.com" <hugocoolens@gmail.com> |
|---|---|
| Date | 2021-07-13 04:53 -0700 |
| Message-ID | <ce48011d-8e32-4641-bb57-d16a5c24d372n@googlegroups.com> |
| In reply to | #4418 |
On Saturday, July 10, 2021 at 5:07:26 PM UTC+2, Gavin Buxton wrote: > Ah, I think I see now. You could > set terminal pslatex size 25cm,17cm monochrome > set output "fileforlatex.tex" > plot sin(x) > set output > set term x11 > rep > > and just plot it again to the screen, but it might not look the same in a different terminal. Dear Gavin, This is exactly what I needed. It makes my workflow a lot more efficient because when I see the plot looks OK on the screen I can now immediately start LaTeX, otherwise I always had to put those two lines in comment and rerun Gnuplot an extra time to produce the LaTeX picture. Thanks a lot and kind regards, Hugo
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web