I would appreciate if someone could explain what I need to do to make this script run multiple times without restarting each time. So I have a "solution", but it is fragile. The output from gnuplot can then be included in a LaTeX document, but LaTeXs own pgfplots will produce nicer results. The first time is exactly what I wanted, the second time will skew the labels as shown above. gnuplot is a plotting tool that is used outside LaTeX (although there is a package that allows you to use in latex). I thought this was due to the order of the commands set origin/size relative to x/ylabel and x/y range, but simply running the below code twice without restarting gnuplot will generate two different plots. Just to give you an example, this is what I have on my. You can download them from github: Gnuplot.sh GpTex.sh Make sure you have these two scripts on a folder which is on your path. set term epslatex color size 4in,3in set xrange -5:5 set yrange 0:0.6 set. gnuplot and latex I have two scripts (one of them is a silly one) to only use latex on the plots. The second time through, the range and labels are still attached to the size and origin from the last plot, which is the inset. Secondly, a script is written for Gnuplot in order to generate a. Specifically, the first time through, the default placement of the text labels is fine. The problem is that somewhere the state of the gnuplot environment is changed and is not reset by this script. To generate my graphs, I had run the script twice, once using term wxt and then again using term epslatex. Per Tom Fenech's suggestion, I made a minimum code sample to reproduce the error, and the issue that arose is a machine state problem. Set style line 5 lc rgb 'black' lw 1 lt 0 Set style line 4 lc rgb 'magenta' lw 2 lt 7 Set style line 3 lc rgb 'green' lw 2 lt 5 The commented sections indicate the original script that used set size and origin commands to manually place the second plot as a inset, rather than side by side. I'm using gnuplot 4.6 patch 4, and Linux Mint 17. I thought using the set size & origin commands might have confused the epslatex terminal output, so I attempted to use the layout command and make the plots side by side just to see if the text would print correctly. When I submit the same commands to term='epslatex', the plot is fine, but all text (axis and tic mark labels) is positioned incorrectly. I can generate the plot exactly as I want with term='wxt' except for the axis labels, which require LaTeX formatting for generating the desired symbols. I am trying to use the multiplot feature of gnuplot to make a inset graphic on the main plot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |