Loading ...
Sorry, an error occurred while loading the content.
 

bug fix: crosshatch fill (eg. hatch6) with -scale

Expand Messages
  • Stephen C. Grubb
    Hi, when using a crosshatch fill (eg. hatch6) and also enlarging or reducing the overall result using -scale, a bug involving incorrect line thickness occurs.
    Message 1 of 1 , Apr 20, 2007
      Hi,

      when using a crosshatch fill (eg. hatch6) and also enlarging or reducing
      the overall result using -scale, a bug involving incorrect line thickness
      occurs. For example, when drawing a bar graph where the bars are filled
      with hatch6 and the result is enlarged using -scale 1.5, the line
      thickness grows progressively fatter (exponentially), giving an
      unusable result. The problem is that linewidth context is not being
      restored properly when scalefactor is involved.


      You can fix this problem by doing the following:

      in your ploticus source directory edit the file stub.c

      263 sprintf( buf, "%d", pattern );
      264 Epcode( 'Y', linewidth, pat_dens, buf );
      265 Ecurlinewidth = linewidth / Estandard_lwscale; /* <-- */
      266 Ecurlinetype = pattern;

      find line 265 and change it as above. Then do: make clean; make

      -Steve


      On Fri, 20 Apr 2007, Koval Valery wrote:

      > Hi.
      >
      > First of all, thanks for you for fix previous bug with negative Y.
      > Yesterday I check it - all ok.
      >
      > Second. I try to build figure with scale >1.0 but bar contour lines
      > have doubled width after next iterations.
      >
      > Please check it: run script.
      > If I'm use scale 1.0 - no problem.
      >
      > #!/bin/sh
      >
      > #DEV=png
      > DEV=gif
      >
      > name=$0
      >
      > #if -scale 1.0 \
      > #all ok
      >
      > pl \
      > -scale 1.5 \
      > -prefab vbars data=- \
      > x=1 y=2 color=hatch6 barwidth=0.1 \
      > rectangle="1 1 3 3" \
      > outline="color=black style=0 width=0.2" \
      > -$DEV -o ${OUTDIR}${name}.$DEV $ARGS \
      > << EOF
      > 1 845
      > 2 1000
      > 3 5492.5
      > 4 2000
      > 5 4656.1
      > 6 1946.63
      > 7 0
      > 8 1000
      > 9 5492.5
      > 10 2000
      > 11 4656.1
      > EOF
      >
      >
      >
      >


      Stephen C. Grubb scg@... x-6633
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA
    Your message has been successfully submitted and would be delivered to recipients shortly.