MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Gridlines in MultipleListPlot

  • To: mathgroup at
  • Subject: [mg58872] Re: [mg58848] Gridlines in MultipleListPlot
  • From: "Januk Aggarwal" <ggroup at>
  • Date: Thu, 21 Jul 2005 15:46:03 -0400 (EDT)
  • References: <> <>
  • Sender: owner-wri-mathgroup at

Hi David,

I appreciate the comments, and usually I would agree with your points about 
gridlines.  However, these are working plots, not publication plots. We have 
hundreds of thousands of data points per data set.  Generating a 
representative table would be nice, but would be extremely time consuming.  
It becomes impossible very quickly when you consider that we want to be 
comparing many plots at once (upwards of 30-40).

By judicious choice of line thicknesses and colours, I know I can make these 
plots readable for our purposes, I do it all the time in Excel.  However, 
Excel can't handle the amount of data we're going to be generating, nor is 
it easy to automate.

I'm not sure if I made it clear, but the intention will be to print one plot 
per page, so I'm not worried about grid lines cluttering the graphic.  
Again, judicious choice of line thicknesses and colours can help there.

Thanks very much for the input though.


On Thu, 21 Jul 2005 11:50:11 -0400, David Park wrote
> I would like to suggest that you consider not doing that at all. The 
> solid black grid lines and the dashed black grids on the minor ticks 
> will completely dominate the graphic and hide or seriously distract 
> from your wonderful data. It is what Edward Tufte calls 'computer 
> junk'. If you are going to put on grid lines at all, put them only 
> on the major ticks and make them a very light gray - barely visible. 
> On a graphic, ancillary information should be put in with what 
> Edward Tufte (again) calls 'the minimum effective difference'.
> If it is important enough that the viewer should closely read off 
> the values of the data points, and that is the purpose of the grid 
> lines, then you could consider adding a table of the data values so 
> the reader can obtain the actual values without having to 
> interpolate on a plot.
> David Park
> djmp at
> From: ggroup at [mailto:ggroup at]
To: mathgroup at
> Hi,
> I'm trying to come up with a solution that will allow me to generate 
> a MultipleListPlot that has solid gridlines for every major tick 
> mark and dashed gridlines for every minor tick mark.
> So far, I've been able to come up with a module (see code below) 
> which generates a table of gridlines and styles.  I can then use 
> this table with the GridLines option.  My solution so far is to plot 
> the data using ListPlot and extract the tick mark positions using 
> the AbsoluteOptions command.  I handle multiple lists by merely 
> joining the lists together for the ListPlot.
> One problem I've noticed with this technique is that it fails when 
> the lists have different dimension (ie one list could be 2D, the 
> other 1D). I'm also slightly concerned that I might run into a case 
> where the tick marks automatically generated by ListPlot and those 
> generated by MultipleListPlot may not be the same.  So far it seems 
> to be working as intended, but my code does seem somewhat heavy-handed.
> Any suggestions would be very much appreciated.  Thanks!
> MyListPlot[f___List, opts___?OptionQ] :=
>   Module[{ticks, yticks, xticks, grid, i},
>     ticks = Ticks /. AbsoluteOptions[
>           ListPlot[Join[f], DisplayFunction ->
>     Identity, PlotRange -> {All, All}]];
>     yticks = ticks[2];
>     xticks = ticks[1];
>     grid = {
>         Table[
>           If[xticks[i, 2] =!= "",
>             {xticks[i, 1], {GreyLevel[0.], Thickness[0.002]}},
>             {xticks[i, 1], {Dashing[{0.005, 0.005}],
> Thickness[0.001]}}],
>           {i, Length[xticks]}]
>         ,
>         Table[
>           If[yticks[i, 2] =!= "",
>             {yticks[i, 1], {GreyLevel[0.], Thickness[0.002]}},
>             {yticks[i, 1], {Dashing[{0.005, 0.005}],
> Thickness[0.001]}}],
>           {i, Length[yticks]}]};
>     MultipleListPlot[f, GridLines -> grid, opts];]

  • Prev by Date: Re: faster Interpolation?
  • Next by Date: Re: Symbolic Constrained Maximization
  • Previous by thread: Gridlines in MultipleListPlot
  • Next by thread: Re: Gridlines in MultipleListPlot