So I have a situation (plotting a projected bandstructure) that requires translucent circles with variable sizes. Normally, set style fill transparent solid [...] and plot [...] with circles would seem to be the best bet, as the circles scales with the x-axis, and I get translucency. However, I noticed a problem that the circles look really jagged – as if they were inserted from a bitmap, looking nothing like what the set object ## circle command does.
Then I tried plot [...] with points pointsize variable, which gives beautifully round points (since points are just handled like text by gnuplot). This is great and all, but now I've got two issues:
No translucency settings for points. (Or at least that which I am aware of.)
gnuplot doesn't clip point markers at the plot edges as it does with circles; or at least not gracefully, as it just avoids plotting the point at all.
So it would seem that circles still works the closest to what I need, but the resolution is just too low. (I Googled and Reddit-searched, and no one seemed to have mentioned this problem.) There don't seem to be any settings related to that aspect either. Has anyone here run into similar issues? What are your workarounds? Ty.
P.S. my term is pdfcairo. Not sure if that is the problem, but the low-res circles thing also happened with postscript.
Is there a way to add a nicely formatted table to a plot? Preferably next to the plot or at the bottom? I saw that matplotlib can do this but I have 0 experience with it
So for a lab, I need to add the superposition of two wave functions (symmetric and anti-symmetric coupled oscillations) and show that the combination of the two replicates that which would see in a combined configuration.
To cut straight to the point, I just need to either graph the output of the combination of two functions that I have curved fitted or be able to graph the summation of the two functions and curve fit that.
As you can see the domain of the function that I want is [1.904 : 1.907]. If I plot this I see a smaller segment that not fit the domain. Anyone can help me on this?
I have tried to install gnuplot on Cygwin but ran into issues. I am not sure what libraries/packages (not sure what the right term would be) to install along with gnuplot, but I tried qt, wx, and x11. gnuplot seems to install and when I try plotting to a file I get the result, but I kept getting errors when trying to plot to a GUI. I have tried only having each of qt, wx, and x11 installed individually to see if maybe there was some adverse interaction, but it did not resolve the issue. I have since uninstalled gnuplot to retry again with a fresh install.
I am looking for someone who knows what they are doing to help me along the process of getting this working. I can try again tomorrow posting comments of what errors I come along during my adventure (I was mostly seeing things like qt.qpa.screen: QXcbConnection: Could not connect to display :0.0).
I am looking to install gnuplot on Cygwin rather than windows normally because I would like to work with gnuplot through C/C++ and start using that more than my usual Python with Matplotlib setup.
Hopefully there is someone familiar enough with the Cygwin gnuplot install that can help me out.
I have a single column data file, I would like these to be binned automatically with a given bin width. The x axis would be the bin and y would be the count in each bin.
Hello there! I need to plot some data in logscale, and i want to set the labels in scientific notation, like: 10-2 10-3 10-4 ... The problem is that when I use the comand -- set format x "10{%T}" --, the point x=1 also appears in scientific notation, like 100. I want to know if there's a command to make all the other numbers appear in scientific notation and the number 1 appears just like 1.
Namely, I have several files with the same structure (with only one parameter having changed to generate them), and would like to superimpose the curves obtained on each of them.
For one file, the command is this one:
plot "myDataFile-parameter=1.0" using 1:(($2)**2+($3)**2) with lines ; set grid ; show grid
I've been struggling with this weird thing that I have never encountered before in any terminal in Gnuplot. I can't change the size of the legends with
set key font ',8'
in cairolatex terminal. If I try to change the fonts of xlabel and ylabel, problem will still remaing for font size of tics, which I can't change with a generic command of
set xtics font ',somenumber'
set ytics font ',somenumber'
I'm using this terminal specifically for some Turkish characters, which I can't manage to do in any other terminals.
I'm using Gnuplot V4.6 patchlevel 4 in an ubuntu 32bit machine so upgrading to 5 is a no go without going to hustle to upgrade ubuntu 64bit.
I want to test a Jet only on 1D (with 3 Components). I need to 3D plot my .tabfiles but with the following structure:
xAxis : r(radi)
yAxis : t(time)
color : Density Pressure etc.
Thing is, .tab Files are MapInfo, and when I code 'set pm3d map' and splot with r:t:(quantity) It doesnt give any results, but when I do the same with 2D tests, it does. Is this the right place to ask? Any help?
*I didn't ask on Computational Forums, because this is somehow related on how t is treated as a parameter?
Hi all, I'm currently trying to learn gnuplot so that I can produce visual output for my C++ game of life program. My program outputs a file containing the coordinates of living cells, and I want to display these.
Currently I am using "plot 'data.txt' with points" and this works alright, but it's hard to see. How can I change it so that it fills in a square for each grid point?
I've been looking for a way to plot data using C. I found gnuplot to be perfect for this job, and I got it to work pretty nice too. I just have trouble adding Y-value on top of my bars.
So here's the thing: I do not want to store my data in a new file (temp.dat), but send the data directly to GNUPLOT. I do that with these lines:
fprintf(gnuplotPipe, "plot '-' u 1:2 with boxes notitle, '' u 1:2:2 with labels offset char 0,1\n");
for (int i = 0; i < 26; i++){
fprintf(gnuplotPipe, "%d %.2f\n", i+1, alphabetPerc[i]);
}
plot '-' u 1:2 with boxes works fine, but the label part doesn't. I do know that the labels part works properly, I've tried to do that on it's own. The problem is that only the first line works, everything past the comma doesn't. How can I make gnuplot render both parts?
I would like to plot over a jpeg of a graph using gnuplot. The input jpg measures 1725x1134.
I got it working using the following code but would appreciate some help with some questions.
#trying to overlap the plots
reset
F = 7441.9
A = 12.7*25.4
tau_avg = F/A
#dummy data to locate the points 0,0 and 1,3. First row not plotting! why?
dummy << EOD
-0.1 0.1
0 0
0.1 0.1
1 3
EOD
set terminal pngcairo size 1725,1134 font ',24'
set output 'plot2.png'
unset xtics
unset ytics
set x2range [0:12.7]
set y2range [0:3*tau_avg]
unset border
#set size ratio -1
set lmargin 0
set rmargin 0
set tmargin 0
set bmargin 0
#set autoscale fix
#set autoscale noextend
set key above autotitle columnhead
plot 'ShearStressDistrib.jpg' binary filetype=jpg with rgbimage notitle,\
'$dummy' using ($1*10.15+1.92):($2*16.9+9.1) with linespoints lw 3 ps 5 axes x2y2 notitle, \
'NodShear_0p003' every ::7 using ($1*10.15+1.92):($2*16.9+9.1) with linespoints lw 3 ps 5 axes x2y2 notitle, \
set terminal wxt size 1725,1134
replot
unset output #release created files
pause mouse any "Any key or button will terminate"
I plotted the purple line containing the points 0,0 and 1,3 so I could get the scale and offset to plot my data correctly. It will be hidden in the final plot. For x I found the offset and scale to be ($1*10.15+1.92) and for y I found it to be ($2*16.9+9.1).
My questions are:
Is there a better way of overlaying my data onto the graph without the trouble of finding the scale and offset parameters manually? I thought perhaps picking the pixel coordinates of the origin and point 1,3 in paint and supplying gnuplot with these points.
Secondly why does
plot '$dummy' using ($1*10.15+1.92):($2*16.9+9.1) with linespoints lw 3 ps 5 axes x2y2 notitle
ignore the 1st row of data. If I make a separate test.plt script, it actually plots the first data point of -0.1,0.1
Lastly, how do I hide the green line below a certain threshold of x <0 . I could have chosen a different starting point with "every ::" but I wanted to plot all the data since it may be that I don't have a data point exactly at x =0. I'm thinking of simply hiding it with a white rectangle
'NodShear_0p003' contains:
Curveplot
Single lap shear Type A
Distance
Interface Nodal Shear Stress
Node
242-580 #pts=13
* Minval= 7.4240331650e+00 at time= 7.4207496643
* Maxval= 4.7628917694e+01 at time= 10.5993556976
0.0000000000e+00 2.9396602631e+01
1.0611612797e+00 4.0362724304e+01
2.1216135025e+00 4.7527164459e+01
3.1816465855e+00 1.5796671867e+01
4.2415246964e+00 8.8657903671e+00
5.3013277054e+00 7.6924691200e+00
6.3610658646e+00 8.0179653168e+00
7.4207496643e+00 7.4240331650e+00
8.4803667068e+00 8.3691978455e+00
9.5399274826e+00 1.6596443176e+01
1.0599355698e+01 4.7628917694e+01
1.1658383369e+01 4.0316844940e+01
1.2717031479e+01 2.9261829376e+01
endcurve