Changeset 31069 in project


Ignore:
Timestamp:
06/24/14 11:07:30 (6 years ago)
Author:
Ivan Raikov
Message:

picnic: updates to pointsets plotting script

Location:
release/4/picnic/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/picnic/trunk/examples/GLHP.picnic

    r31066 r31069  
    7878                    output s
    7979
     80         component (type pointset) (name GC)
     81                   
     82                    s = (PointsFromFile ("GCcoordinates.dat"))
     83                   
     84                    output s
     85
     86         component (type pointset) (name GCT)
     87                   
     88                    s = (PointsFromFile ("GCTcoordinates.dat"))
     89                   
     90                    output s
     91
    8092         component (type section) (name AscendingAxons)
    8193                   
  • release/4/picnic/trunk/scripts/plotPointsets.rkt

    r31068 r31069  
    6262
    6363
    64 (define (plotPointsets pointset-file pointset-files)
     64(define (plotPointsets pointset-spec pointset-specs)
    6565
    6666  (match-let
    6767      (
    68        ((list first-pointset sx sy sz)
    69         (call-with-input-file pointset-file
    70           (lambda (port) (read-pointset port make-numeric-row-reader))))
     68       ((list first-pointset-label first-pointset-color first-pointset sx sy sz)
     69        (match-let (((list pointset-label pointset-color pointset-file) pointset-spec))
     70          (call-with-input-file pointset-file
     71            (lambda (port) (append (list pointset-label pointset-color)
     72                                   (read-pointset port make-numeric-row-reader))))))
    7173       )
    7274
    7375      (let ((rest-pointsets
    74              (map (lambda (filename)
    75                     (call-with-input-file filename
    76                       (lambda (port) (read-pointset port make-numeric-row-reader))))
    77                   pointset-files)))
     76             (map (lambda (pointset-spec)
     77                    (match-let (((list pointset-label pointset-color pointset-file) pointset-spec))
     78                      (call-with-input-file pointset-file
     79                        (lambda (port) (append (list pointset-label pointset-color)
     80                                               (read-pointset port make-numeric-row-reader))))))
     81                  pointset-specs)))
    7882 
    7983        (let*
     
    9599             
    96100             (pointset-plot
    97               (points3d first-pointset #:sym 'dot #:z-max Zextent #:color (->pen-color 9)))
     101              (points3d first-pointset #:label first-pointset-label #:sym 'dot #:z-max Zextent #:size 24  #:color first-pointset-color))
    98102
    99103             (rest-pointset-plots
    100               (map (lambda (pts) (points3d pts #:sym 'dot #:z-max Zextent #:color (->pen-color 10)))
     104              (map (lambda (pointset)
     105                     (match-let
     106                         (
     107                          ((list label color pts sx sy sz) pointset)
     108                          )
     109                     (points3d pts #:label label #:sym 'dot #:z-max Zextent #:color color)))
    101110                   rest-pointsets))
    102111             
     
    115124             )
    116125
    117           (plot3d (append rest-pointset-plots (list pointset-plot cube-plot))
    118                   #:angle 55 #:altitude 30 #:width 800 #:height 600 #:z-label "z axis")
     126          (parameterize
     127              (
     128               [plot-z-ticks (ticks (lambda (x y) (list (pre-tick 100 #t) (pre-tick 200 #t)))
     129                                    (linear-ticks-format))]
     130               [plot-y-ticks (linear-ticks #:number 5 #:base 10)]
     131               [plot-x-ticks (linear-ticks #:number 5 #:base 10)]
     132
     133               )
     134            (plot3d (append rest-pointset-plots (list pointset-plot cube-plot))
     135                    #:out-kind 'pdf #:out-file "CellPositions.pdf"
     136                    #:angle 55 #:altitude 30 #:width 800 #:height 600
     137                    #:z-label "z [um]" #:y-label "y [um]" #:x-label "x [um]"
     138                    ))
    119139          ))
    120140      ))
    121141
    122142(define  (main . argv)
     143  (plot-font-size 24)
    123144  (plotPointsets (car argv) (cdr argv)))
    124145
    125 (main "/home/igr/src/scheme/chicken-eggs/picnic/trunk/examples/GoC.pointset.dat")
    126 
     146(main `("Golgi cell" ,(list 255 102 178) "/home/igr/src/model/GL/Molecular_Layer.Tue24Jun2014_1329/GoC.pointset.dat")
     147      `("Granule cell" ,(->pen-color 9) "/home/igr/src/model/GL/Molecular_Layer.Tue24Jun2014_1329/GC.pointset.dat")
     148      )
Note: See TracChangeset for help on using the changeset viewer.