Re: Points disappeared in ListPlot
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1285] Re: Points disappeared in ListPlot
- From: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
- Date: Wed, 31 May 1995 05:15:47 -0400
- Organization: University of Colorado, Boulder
In article <3q3mc3$mc5 at news0.cybernetics.net>, Kyle Oliver <koliver at bu.edu> wrote: >I just installed MMa on 12 Pentium 75 in one of my labs, and when I run >ListPlot, the points do not show up? We have a site license for all of our >machines, so it should not be a license problem. I can solve the problem by >using PlotStyle->PointSize[0.01], but I would have to type this in every time. >Does anyone know of a global solution, or how I can change the default >PointSize? Thanks for your help. >Kyle F. Oliver >koliver at acs.bu.edu A while back I wrote some definitions for Plot that give it a default Thickness. A similar technique could be used to give ListPlot a default PointSize. Here are the definitions. They use a global variable called $DefaultThickness. These definitions may seem complex but they handle many possible cases, including specification of Thickness primitives in Options[Plot]. Note that a manifest Thickness directive will not be overriden by these rules under any (I hope!) circumstances. See the examples that follow. Unprotect[Plot]; Plot[heads___, PlotStyle->Automatic, tails___] := Plot[heads, PlotStyle->Thickness[$DefaultThickness], tails] Plot[heads___, PlotStyle->style_, tails___] /; !ListQ[style] && FreeQ[style,Thickness] := Plot[heads, PlotStyle->{{style,Thickness[$DefaultThickness]}}, tails] Plot[heads___, PlotStyle->{h___, style_, t___}, tails___] /; FreeQ[{style},Thickness] := Plot[heads, PlotStyle-> {h, Flatten[{style, Thickness[$DefaultThickness]}], t}, tails] Plot[args__] /; FreeQ[{args}, PlotStyle] := Plot[args, Evaluate[PlotStyle->(PlotStyle/.Options[Plot])]] Protect[Plot]; Here are some examples of use: $DefaultThickness=.005; Plot[{Sin[x],Sin[2x],Sin[3x],Sin[4x]}, {x,-2,2}, PlotStyle->{GrayLevel[.5], {RGBColor[1,0,0],Dashing[{.02,.04}]}, {RGBColor[0,1,0],Thickness[.02]}, Thickness[.01]}, Frame->True] SetOptions[Plot, PlotStyle->Automatic]; $DefaultThickness=.1; Plot[Sin[x], {x,-1,1}] Dave Wagner Principia Consulting (303) 786-8371 dbwagner at princon.com http://www.princon.com/princon