Using varibles in the text command

DataGraph Forums Technical Support Feedback and Suggestions Using varibles in the text command

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5354
    wilhershberger
    Participant

      Would it be possible to add the ability to use variables in the text command? It would be great to be able to add text to a graph that would update if the data changes. Such as in a scatter plot, adding text to indicate average, max, min, s, sem… These variables are calculated and displayed in columns in the data field.

      Thank you,

      #5355
      wilhershberger
      Participant

        Screen shot

        Here you can see the variables are calculated and displayed. But they can’t be used in the text command.

        Thank you,

        #5356
        dgteam
        Moderator

          You can add variables into the Text command using a token.  These are blue pill-shaped entries that will dynamically update when you change your data.   There are two types of values that can be used for tokens:

          1. From a global variable
          2. From another command

          For example, the Text command documentation demonstrates how to use display results from a Fit command, where the plus symbol to the right of the text box is used to add the Token.

          I see in your file you have the values calculated in the data table. These values cannot be used as tokens. Instead, use a Number from Column variable to calculate the values.  FYI — Some commands can calculate summary stats that can directly be used as a token (Box, Histogram).

          Here is an example showing tokens from a Box command and tokens from two variables ….

          Tokens

          In your case, I think all the values you want to calculate are options in the number from column variable, so that is probably the way to go.

          Does that help / make sense?

          I am curious what command you are using to plot the data.  Are you use these means to also create the graph when the error bars?  If you are you might want to consider a slightly different approach where you flatten the data and then use the Pivot command – that can give you the graph with the mean and sem in one step.  Just a thought!  If you want more information or have other questions – let us know.

           

          #5359
          wilhershberger
          Participant

            Got it. Thanks! Terrific program that is getting better all the time.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.

          DataGraph Forums Technical Support Feedback and Suggestions Using varibles in the text command