Menu

fill a histogram | unwanted line

Evgenii
2016-02-23
2016-12-27
  • Evgenii

    Evgenii - 2016-02-23

    Dear Vincent,

    I plotted my data using filled histogram... And there is an unwanted line (very thin, but visible), y=0...
    The code is


    xrange -1:14
    yrange -0.1:0.2

    histogram /gap=0.5
    fill 0
    fill-color blue
    plot data.dat@2:3 /color=black /line-style=no


    What do you think?

    Thank you in advance!

     

    Last edit: Evgenii 2016-02-23
  • Evgenii

    Evgenii - 2016-04-06

    Any ideas regarding this line?

     
  • Vincent Fourmond

    Sorry, had completely forgotten this. Could you post the original PDF file ? I think this may be a but in the PDF rendering rather than in ctioga2 (at least, I can't reproduce it with data looking reasonably like yours).

     
  • Evgenii

    Evgenii - 2016-04-07

    Thank you for the reply!
    Attached is the pdf file.

     
  • Vincent Fourmond

    Indeed, this is an anti-aliasing artifact of the PDF display. Here's what I have using evince.

     
  • Vincent Fourmond

    Hmmm. On second thougts, I don't know. The line is visible in Acrobat reader and in xpdf. The line keeps getting thinner when I zoom in, so it's not a "real" line... How does it print ?

     
  • Evgenii

    Evgenii - 2016-04-08

    I also don't see the line when opening with evince.
    But it is there when using okular or adobe acrobat reader.
    Now I printed the pdf from evince and there is printed thin blue line connecting the bars (y=0).

     
  • Evgenii

    Evgenii - 2016-12-27

    Hello!
    Do you have any news regarding this line?

     

    Last edit: Evgenii 2017-01-01
  • Vincent Fourmond

    Wow, sorry for being so long.

    In the PDF file, I can clearly see that the last operation in the drawing of the histograms should be a "moveto", but is in fact a "lineto". Changing that by hand seems to work (see attached PDF). I'll see what I can do in the source code, though...

     
  • Evgenii

    Evgenii - 2017-02-01

    It works! Thank you!

     
  • Vincent Fourmond

    Hey, I've looked into that further, and into the PDF spec. I'm unsure what to do. Clearly, my fix is wrong, and give very bad results in other cases. The problem is that ctioga2 is asking to the PDF viewer to fill a complicated shape that contains a 0-width rectangle, which most viewers chose to render as a very thin line (but some do not).

    I'm reverting the fix for now, I'll have to come up with another way of doing that, involving fill each bar separately.

    Hmm...

     

Log in to post a comment.