Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2804
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2015-03-02 06:12 -0800 |
| References | <5c049f40-c989-4fa8-8945-6a03cfdfff63@hh9g2000vbb.googlegroups.com> <94137469-3f70-455a-a38f-0d7c93e7a77c@googlegroups.com> |
| Message-ID | <a32ff268-c6d5-44c0-9c22-68bf9da702f9@googlegroups.com> (permalink) |
| Subject | Re: Discontinuities in fill plot |
| From | dkeathley@gmail.com |
This seems like an old question, but I had the same issue. I think the suggestion to draw a polygon is a good one. However, I found that this is actually what happens when you use filledcurves to fill a region between the x-axis and a single curve, so this is not an issue for one curve. However, if you are trying to fill between two curves with the notation suggested by most demo scripts as shown here (i.e. plot ... using 1:2:3 ...), it uses a bunch of separate trapezoids rather than one solid polygon. You can see this by making the sampling larger. The issue seems to be that tikz is always making a very find border that has a slightly different color than the transparent fill. I found the solution to be in the end to plot one vector where each point is a vertex of the polygon that would fill between the curves. In other words, the vector sarts by specifying all of the x-y points of the top curve, moving from left to right in x, followed by all of the x-y points of the bottom curve, moving from right to left. Then just plot this one vector with plot ... using 1:2 ... This makes one polygon with a single face so you don't have this stitching/border error between a bunch of separate polygons. On Monday, January 13, 2014 at 8:41:22 PM UTC-5, marcell...@gmail.com wrote: > The problem disappears when instead of plotting with a filledcurve style, you explicitly define a polygon with the "set object" command. > > set object 1 polygon fc rgb 'red' front \ > from 0 , 0.0886798 \ > to 0.01 , 0.0938408 \ > to 0.02 , 0.0990018 \ > # ... add more points as you please > > plot 'something' > > The "set object" man page is of great help. > > You cannot use the same data file this way, but if you have a program that generates your data, then you can easily modify it a little to output the polygon object for you. Or you can use a macro or search and replace with regular expressions to modify your data file to polygon object syntax.
Back to comp.graphics.apps.gnuplot | Previous | Next | Find similar
Re: Discontinuities in fill plot dkeathley@gmail.com - 2015-03-02 06:12 -0800
csiph-web