Gnuplot: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
m →png: linki |
m →pngcairo: ref |
||
Linia 237:
{pointscale <ps>}
{size <XX>{unit},<YY>{unit}}
</pre>
Przykład<ref>[https://unix.stackexchange.com/questions/617823/gnuplot-setting-image-width-with-pixels-for-specific-dpi unix.stackexchange question : gnuplot-setting-image-width-with-pixels-for-specific-dpi]</ref>
<pre>
dpi = 300 ## dpi (variable)
width = 90 ## mm (variable)
height = 164.5 ## mm (variable)
in2mm = 25.4 # mm (fixed)
pt2mm = 0.3528 # mm (fixed)
mm2px = dpi/in2mm
ptscale = pt2mm*mm2px
round(x) = x - floor(x) < 0.5 ? floor(x) : ceil(x)
wpx = round(width * mm2px)
hpx = round(height * mm2px)
set terminal pngcairo size wpx,hpx fontscale ptscale linewidth ptscale pointscale ptscale
# PLOT HERE
</pre>
|