[FieldTrip] Adding tick marks to the X and Y axes in multiplotER and multiplotTFR images

Stephen Politzer-Ahles stephen.politzer-ahles at ling-phil.ox.ac.uk
Fri Nov 27 13:28:58 CET 2015


Hi Erin,

I don't use the multiplot functions much, so my solution is clunky and
there may be others on the list with a better way to do this. But just in
case, here's how I do it:

Rather than using multiplot, I make each plot individually, and use the
subplot() command to arrange multiple plots into a figure. Within each
subplot, I just use some custom code to draw the ticks. For example:

tickspots = [-200:200:1000]; % one tick every 200 ms, from -200 to 1000 ms
tickheight = [-.5 .5]; % how high and low the ticks will go

for tickspots = tickspot % iterate through tick spots
plot( [tickspot tickspot], tickheight, 'k' ); % plot each tick as a black
line
end;


Best,
Steve



---
Stephen Politzer-Ahles
University of Oxford
Language and Brain Lab, Faculty of Linguistics, Phonetics & Philology
http://users.ox.ac.uk/~cpgl0080/



> ------------------------------
>
> Message: 2
> Date: Thu, 26 Nov 2015 12:48:25 +0000
> From: Erin White <erin.white at sickkids.ca>
> To: "fieldtrip at science.ru.nl" <fieldtrip at science.ru.nl>
> Subject: [FieldTrip] Adding tick marks to the X and Y axes in
>         multiplotER and multiplotTFR images
> Message-ID:
>         <0D4EE8880DEE3047BEC905C0EC463F8C2769D79D at SKMBXX03.sickkids.ca>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
> I'm new at programming and was wondering if someone could help with
> something that I'm sure is simple.
> I'd like to add tick marks to my multiplotER and multiplotTFR figures so
> that the timing and amplitude (for multiplotER) and timing and frequency
> (for multiplotTFR) scales are presented clearly. For example, I'd like a
> tick mark on my X axes every 200 ms, and on the y axes, every 2 mV for ER
> images and every 5 Hz for TFR images.
>
> Could anyone suggest what I should add to my code to show this?
>
> Thanks very much!
>
> Erin
>
>
>
>
>
>
>
>
>
>
>
>
> ----------------------------------------------------
> Erin White, PhD
> Post-Doctoral Research Fellow
> Neurosciences and Mental Health
> The Hospital for Sick Children
> 555 University Avenue
> Toronto, Ontario
> Canada
> Telephone: (647)834-7813
>
> ________________________________
>
> This e-mail may contain confidential, personal and/or health
> information(information which may be subject to legal restrictions on use,
> retention and/or disclosure) for the sole use of the intended recipient.
> Any review or distribution by anyone other than the person for whom it was
> originally intended is strictly prohibited. If you have received this
> e-mail in error, please contact the sender and delete all copies.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151126/f0640a71/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 60, Issue 23
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151127/85d5318c/attachment-0002.html>


More information about the fieldtrip mailing list