I'm having difficulty getting plot to use the x-axis data with a bar-type plot.

Data being plotted:

   dpn,:dpq  NB. x-axis values ,: y-axis values
  1   3   5   7  9  11  13 15 17 19 21 23 25 27 29 31 33 35
205 202 298 101 54 119 105 40 15 16  2 15 33  3  5 11  1  1

All the following plots work as I'd expect:

   plot dpn;dpq
   'type line' plot dpn;dpq NB. same as above
   'type stick ' plot dpn;dpq
   'type point' plot dpn;dpq NB. not readable, but accurate

The following does not use x-axis values supplied:

   'type bar' plot dpn;dpq
   
I get bars numbered one through eighteen, rather than odd numbers 1 through 35.

Do I have to set these values manually for bar charts? If so, is that 
difference documented?

Definition of the lists is:

   NB. dp is list of distances between consecutive odd primes under 10000
   dp=: <:}.}.}:+/"1(i.1229) =/ _1 p:i. 9999 
   dpq=: +/"1(~.dp) =/ dp  NB. frequency of distance between primes
   dpn=: /:~~.dp           NB. nub of distance between primes
   NB. (this is the first {:$dpq odd numbers, in this case)
 
Tracy



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to