In gnuplot, cairolatex terminal, plotting pointtype 1 pointsize 5 will display a large '+' sign but only the size of the sign is large, the width of the line will not. How to plot a plus sign that is both larger and thinker than normal? I want just this pointtype to be affected, not all point types. Increasing linewidth does not work in this case.
Assistant
In gnuplot with the cairolatex terminal, the standard pointtype 1 (plus sign) indeed has this limitation where pointsize affects size but not line thickness. Here are several ways to create thicker plus signs:
Method 1: Using Vectors (Most Flexible)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
# Define a function to plot thick plus signs at specific coordinates
thick_plus(x,y,size,width) = sprintf("set arrow from %f,%f to %f,%f nohead lw %f; set arrow from %f,%f to %f,%f nohead lw %f", \
x-size, y, x+size, y, width, \
x, y-size, x, y+size, width)
# Example: plot your data normally, then add thick plus signs at specific points
plot 'data.txt' with lines, \
'' using 1:2:(thick_plus($1,$2,0.1,3)) with table
Method 2: Custom Line Style with Multiple Plot Commands
set terminal cairolatex
set style line 1 lw 3 # thick line
# For each point where you want a thick plus, plot two short lines
plot 'data.txt' with lines, \
'' using ($1-0.1):2:($1+0.1):2 with vectors nohead ls 1, \
'' using 1:($2-0.1):1:($2+0.1) with vectors nohead ls 1
Method 3: Using Plotting Style with Custom Symbol
# Define a thick plus using multiple vector commands
set style line 10 lw 4 # adjust thickness here
plot 'data.txt' with lines, \
for [i=1:N] '+' using (x[i]-size):(y[i]):(2*size):(0) with vectors nohead ls 10, \
for [i=1:N] '+' using (x[i]):(y[i]-size):(0):(2*size) with vectors nohead ls 10
Method 4: Macro Approach for Specific Points
# Define a macro for thick plus
THICK_PLUS = "with vectors nohead lw 4"
# When you need thick plus at specific coordinates (x0,y0) with size s:
size = 0.05
plot 'data.txt' with lines, \
'+' using (x0-size):(y0):(2*size):(0) @THICK_PLUS, \
'+' using (x0):(y0-size):(0):(2*size) @THICK_PLUS
Method 5: For Multiple Points with Thick Plus Signs
If you have a dataset where you want all points as thick plus signs:
set style line 1 lw 3
size = 0.08
plot 'data.txt' using ($1-size):2:($1+size):2 with vectors nohead ls 1 notitle, \
'' using 1:($2-size):1:($2+size) with vectors nohead ls 1 title "Thick Plus Points"
The vector-based approaches give you the most control over both size and thickness. Adjust the size parameter for the plus sign dimensions and lw (linewidth) for thickness. This way, you can have thick plus signs while keeping other point types unaffected.