#pragma rtGlobals=1 // Use modern global access method. //Copyright (C) 2002-5 Jeremy Bergsman //jeremy@bergsman.org // //These programs are free software; you can redistribute them and/or modify //them under the terms of the GNU General Public License as published by //the Free Software Foundation; either version 2 of the License, or any later version. // //These programs are distributed in the hope that they will be useful, //but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details: //http://www.gnu.org/licenses/gpl.html //or write to the Free Software Foundation, Inc. //59 Temple Place, Suite 330 //Boston, MA 02111-1307 //USA Menu "Graph" "NoAxesEtc" "AddLabels" "SquarePixels" End Menu "Layout" "NoFramesEtc" End Function NoAxesEtc() //Remove axes, labels, ticks from top graph for electrophysiology-style graph ModifyGraph tick=3,noLabel=2,axThick=0 Label left "\\u#2" Label bottom "\\u#2" End Function AddLabels() //Add tags to every point on a given trace where the tag text comes from a text wave //e.g. you have a wave with N values for the trace and you want these on the graph String WhichTrace, LabelWaveName, WantToKill, FlagString="/A=MB/F=0/B=1/I=0/L=0/O=0/S=0/X=0/Y=10/Z=0" Variable Loop1 Prompt WhichTrace, "Trace to label", popup, WaveList("*", ";", "WIN:") Prompt LabelWaveName, "Wave containing labels", popup, WaveList("*", ";", "") Prompt WantToKill, "Kill labels?", popup, "No;Yes" Prompt FlagString, "Flags:" DoPrompt "Add Labels", WhichTrace, LabelWaveName, WantToKill, FlagString if (WaveType($LabelWaveName)) Make/O/T/N=(numpnts($LabelWaveName)) LabelWave Wave NumLabelWave=$LabelWaveName LabelWave=num2str(NumLabelWave) else Wave/T LabelWave=$LabelWaveName endif for (Loop1=0; Loop1