Do we have a facility to rotate the image, using mouse, to see different views in gnuplot.
I wish gnuplot had similar facility to rotate the image as MATLAB has.
In my version it just works.
Version 4.4 patchlevel 0
last modified March 2010
You might need to change the terminal for gnuplot.
The window with the nice toolbar is generated by the "wxt" terminal.
gnuplot> set term wxt
Use 'set term' without parameters to show a list of available terminals.
gnuplot> set term
Related
I am using gnuplot 5.9 patchlevel 3 and I wanted to use different lt thus I wanted to reproduce the following this tutorial from gnuplot 5.0 patchlevel 1.
In particular if I copy it and launch it both from term and as .eps I couldn't see dashed lines, here the output
In particular I do not understand the following line:
You will only see dashed lines if your current terminal setting permits it
What does it mean? How I can 'force' gnuplot to print the different dashed lines in .eps, .png or via screen?
I found this guide but its refer to a 4.2.5 version of gnuplot, even if I use:
set termoption dashed
or
set terminal x11 dashed
I can't see the dashed lines...Those are the terminals I can use in gnuplot 5.0 patchlevel 3 from help term:
canvas cgm context corel
dumb dxf eepic emf
emtex epslatex fig hpgl
latex mf mp pcl5
pop postscript pslatex pstex
pstricks push qms svg
tek40xx tek410x texdraw tgif
tkcanvas tpic vttek x11
xlib xterm
I red also this answer but gnuplot 5.0 doesn't support pngcairo (???) as a test, in fact, I just try:
set term pngcairo dashed
And I receive the answer:
Terminal type set to 'unknown'
^
unknown or ambiguous terminal type; type just 'set terminal' for a list
Thus I tried to install pngciaro following this page using homebrew which I found not so useful unfortunately due to the fact that the question about gnuplot 5.0 does not have an answer and because I receive some warning that could be connected with the installation of the pngcairo.
I am using gnuplot 5.9 patchlevel 3
Surely you mean 5.0.3? The image you attached shows dashed lines so what's your question? Then I tried this example script you link to with the eps terminal and it works fine as well on 5.0.3.
Gnuplot renders output using different "terminals", some of the more terminals do not support support dashed lines and this includes the default PNG terminal png, the png terminal from the cairo library, pngcairo, does however support dashed lines. Terminals must be integrated into your Gnuplot build at compile-time, so options must be flagged to enable certain terminals. If Gnuplot was not built with the cairo library then the pngcairo or epscairo terminals will not be available and you will receive that message
unknown or ambiguous terminal type; type just 'set terminal' for a list
when attempting to set you plot to one of those terminals. When you do set term it just displays the terminals which your build was compiled with.
Gnuplot 5 does support pngcairo, it just has to be built with it. Are you on OSX and have homebrew installed? Just install it with cairo support using
brew install gnuplot --with-cairo
I have this program that grabs a lot of usage details regarding your computer and plots everything on a nice graph (below). The issue I am running into is that in the bottom left corner of the gnuplot window where it would normally report where on the (x,y) axis your mouse is currently at, it is reporting my x-axis in scientific notation.
For example, instead of stating that my mouse is at (33:10,20%) it is reporting that it is as (5.10770e+08,20%) <--Random scientific notation). I have already set the timefmt and xdata, so I am confused at to what I am missing in order to properly report the data. If someone could please help it would be greatly appreciated.
I have searched on superuser and Unix/Linux, and this question seems to fit on Stackoverflow the best as gnuplot has its own scripting language. Also if you look at the gnuplot tag on the various sites, gnuplot fits more on stackoverflow and has thousands of more tags compared to 30 and 67.
I have also viewed Turn Off Scientific Notation In Gnuplot and tried to implement the answer here (Christoph is the GNUPLOT man!), but have thus far been unable to configure it to work properly (it still displays the scientific notation).
gnuplot -e persist "set title 'Resource monitor' ; set timefmt '%y/%m/%d-%H:%M:%S' ; set xdata time ; set xlabel 'TIME' ; set ylabel 'PERCENT' set yrange [0:101]" -e "plot '${cpuResFile}' using 1:2 title 'CPU' smooth Bezier, '${memResFile}' using 1:2 title 'MEM' smooth Bezier ; pause -1"
You're in the right place to ask for gnuplot help!
I've tried this on x11 and wxt, don't know other interactive terminals.
You can switch between different mouse statusbar formats by pressing 1 (2 cycle backwards)
Fore more help on interactivity, press h and you'll get a list ho keyboard shortcuts
Some information is on help mouse format
To change it programmatically with the corresponding command set mouse format (but I didn't manage to display properly date/time...)
I`d like to write the math stuff into a plot using gnuplot 5:
I am using the terminal postscript enhanced because as far as I know this terminal is the only only capable of doing such things.
I used this code:
set label 1 at 400,200 '{/Symbol=50\362#_{/=15 350}^{/=15\154}}' front
This gets me everything except the subscribed averageunder the lambda symbol.
I tried everything with {,}and so on but I think I missing the part where I can escape the /SymbolStyle.
Many terminals support enhanced text, not only the postscript terminal.
In order to use another font than /Symbol for the subscript you could change the font explicitely to a different one for this. However, a better approach is to change the nesting so that /Symbol affects only two parts:
set label 1 at 0,0 '{/=50{/Symbol \362}#_{/=15 350}^{/=15{/Symbol \154}_{/=10 average}}' front
plot x
Output with gnuplot 5.0 with wxt is
If you're using the postscript terminal anyway, you could give a try to the epslatex terminal (or cairolatex):
set terminal epslatex standalone color colortext
set output 'equation.tex'
set label 1 at -5,5 '$\displaystyle\int_{350}^{\lambda_{\mathrm{average}}}$'
plot x
set output
system('latex equation.tex')
system('dvips equation.dvi')
system('ps2pdf equation.ps')
I am using gnuplot on a hidpi screen (276 dpi).
The plots I recover are hard to see properly, the lines too thin, the fonts and buttons too small.
Is there any way to configure gnuplot to scale up these parameters for hidpi screens automatically upon start?
gnuplot automatically loads an initialisation file on startup, that you can use to change the default linewidths etc. It accepts normal gnuplot syntax. Check help initialization to see how it's named and where to place it on your system.
Use e.g. set terminal wxt lw 2 to change the absolute default linewidth. The sizes given in a later plot command are just multiplicators for the terminal setting. The pointsize and border/tics linewidth are scaled accordingly.
Using gnuplot 4.6 patchlevel 1, with the following commands,
set grid linewidth 1 linecolor rgb"#888888"
set datafile separator ","
plot for [n=2:100] "data.csv" using 1:(column(n)) with lines linewidth 2
and the following example data in the file "data.csv",
time,S1,S2
0,0.00015,0
0.1,0.0001357256127053939,1.427438729460607e-005
0.2,0.0001228096129616973,2.719038703830272e-005
0.3,0.0001111227331022577,3.887726689774233e-005
0.4,0.0001005480069053459,4.945199309465411e-005
0.5,9.097959895689501e-005,5.902040104310499e-005
0.6,8.232174541410396e-005,6.767825458589604e-005
0.7,7.448779556871142e-005,7.551220443128858e-005
0.8,6.739934461758323e-005,8.260065538241677e-005
0.9,6.098544896108986e-005,8.901455103891014e-005
1,5.518191617571635e-005,9.481808382428365e-005
the resulting plot looks this:
Question: why does the grid only extend partway from the bottom, and not cover the whole plot? I tried a considerable amount of experimentation with the set xtics and ytics commands, arguments to grid, and more, and have not been able to get the grid to cover the whole plot. What am I missing?
Great question! In fact, the answer is that the grid does cover the whole plot. The problem is that the key is taking over. Try it again, but with an unset key in there before your plot command.
What's happening is that gnuplot is reserving space in the key for all of the columns which have no data. Nothing gets put in the space that was reserved since no reasonable data was found. Ultimately, this pushes the 2 lines that were visible out of the viewable canvas area as well.
I've reproduced this using the x11, png, postscript and pngcairo terminals.
Note that this behavior seems to be version dependent:
With gnuplot 4.4.2 (OS-X, png terminal)
With gnuplot 4.6.0 (OS-X, png terminal)
For those using gnuplot 4.4.4, perhaps there was a bug fix which made it work for gnuplot 4.4.4 and then a regression. It seems to persist into gnuplot 4.7.0 as well. I might file a bug report.