Re: Problems with ListPlot

*To*: mathgroup at smc.vnet.net*Subject*: [mg88976] Re: Problems with ListPlot*From*: Szabolcs Horvát <szhorvat at gmail.com>*Date*: Thu, 22 May 2008 06:16:37 -0400 (EDT)*Organization*: University of Bergen*References*: <g0tqvp$mkj$1@smc.vnet.net> <g0uaj8$4vc$1@smc.vnet.net> <g11r60$ad7$1@smc.vnet.net>

Szabolcs Horvát wrote: > On Tue, May 20, 2008 at 1:22 PM, dh <dh at metrohm.ch> wrote: >> Szabolcs HorvÃ¡t wrote: >> >>>> 2) In addition of 1 point and 1 line (2 other should be clipped as >>>> they lie outside of the range) I see 2 points, where the line crosses >>>> the lower and upper edges of the plot. >>> I don't really understand this second question ... >>> >> Hi, >> if you set Joined -> True, there are 2 points visible at:{1.5,0.5} and >> {2.5,1.5} that should not be there. >> Version:"6.0 for Microsoft Windows (32-bit) (February 7, 2008)" >> Daniel > > Oh, sorry, now I see what the OP meant. The Mesh option influences > this, but I couldn't find a workaround ... > It would probably be quicker not to use ListPlot at all, and just > build up the plot from graphics primitives (i.e. quicker than finding > a workaround for this bug) ... It would also make handling plot > markers easier ... > Here's a workaround: Try moving the PlotRange option out of ListPlot (it has a different meaning for plotting functions and for Graphics ... quite confusing ...): Show[ ListPlot[{0, 1, 2}, PlotMarkers -> Style["\[FilledCircle]", FontSize -> 12], Joined -> True, GridLines -> Automatic], PlotRange -> {{1, 3}, {0.5, 1.5}}, AxesOrigin -> Automatic]