Menu

dimension and range of «pointsize»

Help
2020-01-10
2020-01-13
  • Norwid Behrnd

    Norwid Behrnd - 2020-01-10

    Hello,

    in LaTeX's usepackage PStricks, it is possible to define early on the unit and dimension of reference, for example 1 cm (the default), such that an instruction like \psset{linewidth=.5cm} equally may be expressed as \psset{linewidth=.5} (cf. manual , p. 6)

    From Ethan Merrit's answer by 2009/2/12 in this thread here I retain each terminal in gnuplot may use its own scale of reference. Aiming for an output in either .png, or .pdf format as in the MWE attached below where tiles should not overlap each other, I experienced this property as well, yielding two questions:

    1. It is possible to define the dimensions of the canvas, e.g., a pixel-based set term pngcairo size 4096,4096 crop font "Arial,64" enha lw 10, or set term pdfcairo size 6cm,6cm font "Arial,8" enha lw 1 and I am aware of a command like set pointsize 2. Based on the current current manual (May 29, 2019), is my assumption correct that pointsize(if available for the terminal in question) always were dimensionless? Alternatively, because a set pointsize 0.2 mm is not accepted by the pngcairo terminal, are there terminals which would allow an explicit definition related to a unit like pixels; cm, inch, or postscript point?
    2. If gnuplot is set for dimensionsless pointsizes, what is gnuplot's accessible range of this parameter? As in the MWE attached, given a canvas of 4096x4096 px, a relative point size of 0.05 was fine for the .png output, but not so much for the 6x6 cm .pdf. Is it possible that gnuplot refuses point sizes as too little / to large and then deploys instead of the input a minimal / a maximal value? Please consider this question as independent from aesthetics / visual grammar (e.g., Edward Tufte, ggplot).

    Thank you.

     

    Last edit: Norwid Behrnd 2020-01-10
    • Norwid Behrnd

      Norwid Behrnd - 2020-01-13

      As to answer a part of the above question, three gnuplot terminals (pngcairo, pdfcairo, and svg) as provided in gp 5.2.7beta (by 2019-05-14) were iterated, using either their default, or twice of their default dimension of the canvas. This was looped with explicitly defined point sizes 1, 2, and 5 of the filled dot, varying the following theme:

      set terminal pdfcairo size 6in,3in
      set pointsize 1
      set title 'pdfcairo_size_6in_3in_ps_1.pdf'
      set output 'pdfcairo_size_6in_3in_ps_1.pdf'
      plot sin(x) w lp pt 7
      

      The output generated was then imported into inkscape (version 0.92.3 (2405546, 2018-03-11)) where a) the dimension of the file was accessed (Shift-Ctrl-D, document properties) and b) manually a filled circle was juxtaposed to one of the dots drawn by gnuplot. The diameter of this «measurement dot» was increased until the by gnuplot was no longer visible.

      |----------+---------------------------+-------+------|
      | terminal | canvas dimension          | gp ps | size |
      |          |                           |       | (mm) |
      |----------+---------------------------+-------+------|
      | pdfcairo | 6 in x 3 in (default)     |    1  |  2.3 |
      |          | 127 x 76 mm (measured)    |    2  |  4.4 |
      |          | 480 x 288 px              |    5  | 10.8 |
      |----------+---------------------------+-------+------|
      | pdfcairo | 12 in x 6 in (set)        |    1  |  2.3 |
      |          | 305 x 152 mm (measured)   |    2  |  4.5 |
      |          | 1152 x 576 px             |    5  | 10.6 |
      |----------+---------------------------+-------+------|
      | pngcairo | 640 x 480 px (default)    |    1  |  2.1 |
      |          | 169 x 127 mm              |    2  |  3.5 |
      |          | 6.67 x 5.00 in (measured) |    5  |  8.0 |
      |----------+---------------------------+-------+------|
      | pngcairo | 1280 x 960 px (set)       |    1  |  1.9 |
      |          | 339 x 254 mm (measured)   |    2  |  3.5 |
      |          | 13.33 x 10.00 in          |    5  |  8.3 |
      |----------+---------------------------+-------+------|
      | svgcairo | 600 x 400 px (default)    |    1  |  2.7 |
      |          | 159 x 127 mm (measured)   |    2  |  5.3 |
      |          | 6.25 x 5.00 in            |    5  | 13.1 |
      |----------+---------------------------+-------+------|
      | svgcairo | 1200 x 500 px (set)       |    1  |  2.6 |
      |          | 318 x 254 mm (measured)   |    2  |  5.3 |
      |          | 12.50 x 10.00 in          |    5  | 12.6 |
      |----------+---------------------------+-------+------|
      

      So the first line of the canvas dimension is the one set (in gnuplot), which is either explicitly defining the default (in the dimensions of this default), or twice of of it; followed by two lines reporting the document dimension as accessed with inkscape in either millimeters (mm), inches (in), or pixels (px).

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.