Labels

By adding a point to the expression list, you'll automatically have the option to add a label. Enabling the checkbox without adding text will automatically show the coordinates of the point on the graph paper.

    


To create a text label, make sure the "Show Label" checkbox is enabled and type in the text of your choice. The graph paper will automatically update. It's also possible to create labels on movable points

 

Dynamic Labels

If a parameter is already defined in the calculator, then the value of that variable can be used to create dynamic labeling. For example, if m and b are defined in the calculator, then typing ${m} and/or ${b} in any point label text areas will display the numerical values of m and b. The label will automatically update as the value of m or b changes and can be used with text to great effect. Below, we've used y = ${m}x + ${b} as a point label in order to display the equation of the line in slope-intercept form as the sliders are moved. 

 

It's also possible to add formatted math text using back-ticks. This can be combined with dynamic labels to display equations on the graph paper.

 

Have more questions? Submit a request

29 Comments

  • 0
    Avatar
    Michael Solyom

    Not sure if this is related or not, but since this has been implemented I've noticed a problem with intersecting lines: if I click on the intersection of two lines Desmos will let me know the coordinates in the "old" style black and white label, but if I change a slider that moves either line it loses the label -- it used to automatically update and move along with my changes.

    Here's an example: https://www.desmos.com/calculator/t5tckrsxle

    Where the lines intersect is pretty important when I'm building assignments for my students, and to solve for all seven intersections algebraically to build a "new" style label for each seems a bit excessive to me.

    Is this an issue you're aware of?

    Thanks!

  • 5
    Avatar
    Bernard Gilroy

    I absolutely love the label feature.  But I'm sad that, as far as I can tell, the labels will not show up on images generated via the share button.  I prefer using that to taking screenshots, but I don't know how to make point labels appear in the png image.

  • 5
    Avatar
    Filippo Alberto Edoardo Nuccio

    I have the same problem as Bernard: the feature is great, but it would be awsome to be able to export these labels when creating a png image.

  • 0
    Avatar
    Joshua Begay

    This is an awesome feature! It would be helpful if the coordinate point could be minimized or made invisible. That way we could place a label near features that don't necessarily have a point.

     

    --- Nevermind! Figured it out.

    Edited by Joshua Begay
  • 0
    Avatar
    WeThotUWasAToad

    Joshua, I have exactly the same question (ie hiding the actual point so only the label is displayed). I'm glad you "figured it out" but can you explain the solution? Thanks.

     

     

  • 0
    Avatar
    Joshua Begay

    WeThotUWasAToad,

    Add your label then un-select the point by clicking on the colored circle (circle in red). This will turn off the point but leave the label. The label will move around depending on the zoom.

    p.s. DO NOT SEEK THE TREASURE!

    Edited by Joshua Begay
  • 1
    Avatar
    Williamh22114065

    How do you label a function?

     

  • 1
    Avatar
    Josh Hill

    How do you label a line?

  • 1
    Avatar
    Jimbo iscool

    Josh Hill, I don't think there is a way for the label to follow the screen, but I came up with this method so you can move the label. (Excuse the variables, I already had stuff on this graph and was too lazy to make a new one.)

  • 1
    Avatar
    Royi

    Why is the Math expression in Label is parsed so badly?

    Is there to make it look the expressions themselves?

    Thank You.

  • 3
    Avatar
    Kendra Lockman

    Hi, Royi.

    You can include formatted math in labels with LaTeX. So for example to label something x^2 and have it come out as math, type in `x^2` (using the forward-quote, next to the 1 on most keyboards).

    It seems that, for now at least, you can't combine plain text with math formatting in the same label. So you wouldn't be able to create the label  This line is `x^2`

  • 0
    Avatar
    Royi

    @Kendra,

    Could you show an example?

    Thank You.

  • 1
    Avatar
    Kendra Lockman
  • 0
    Avatar
    John Bennett

    Is it possible to have a label choose between two text values? For example, have some moveable points that could be on either the x- or y-axis. The non-zero coordinate is c. So when the point is on the x-axis, I would like the label to show (c, 0) and when it is on the y-axis, (0,c).

    https://www.desmos.com/calculator/2gpuibeyaj

    This file is what I'm working on. The foci of the ellipse can move between the x- and y-axes depending on which of a and b are larger. I would like the labels to adjust when the foci change axes.

  • 1
    Avatar
    Kendra Lockman

    Hi, John.

    I would create two points, one for each instance, and use conditionals to only show that point sometimes. Here's what I mean with your graph.

    https://www.desmos.com/calculator/sv3sk5dzgi

     

    I've done this before to create On/Off switches, where I have one point labeled On, which only shows when the point is in the on position, and another point labeled Off, which only shows when the point is in the off position. If I color them the same, then they look like the same point. Like so.

  • 0
    Avatar
    John Bennett

    That's awesome. I didn't realize you could condition coordinates like that.

  • 0
    Avatar
    Kendra Lockman

    Yeah, it doesn't feel intuitive to me, but it makes sense since you can have calculations inside coordinates. I think I saw it a few times in other people's graphs before it sunk in for graphs I created myself.

  • 0
    Avatar
    Jules Bonin-Ducharme

    Hi Kendra,

    This is a possible solution to the This line is `x^2` problem you listed before.

    There is a way to add spaces between words in the math type.  For example, `This\ line\ is\ x^2` would produce:

    This line is x²

    You can add spaces by adding a space and \ .  For example, `This\ is\ a\ space\ \ \ done` adds 2 spaces between "space" and "done".

    https://www.desmos.com/calculator/9dfby3mvip

    Hope this helps.

     

     

  • 0
    Avatar
    Prossi

    Is there a way I can have fractions in the latex parser for labels? I tried using frac{ and it didn't seem to work, I was hoping Desmos had its own way of doing it

  • 0
    Avatar
    John Bennett

    @Prossi

    It appears you need to add a ` (back tick, usually beside the 1 at the top of the keyboard) and then type in the Latex. I was also able to add variables of the ${a} to use sliders to move the point with the label.

    https://www.desmos.com/calculator/oadwm7c1xk

  • 0
    Avatar
    Paul Prue

    Undocumented feature: use the LaTeX command \textcolor to choose a color for formatted math text in a label. Example label:

    `(\textcolor{red}{x}, \textcolor{green} {y^2} )`

    • The text unaffected by the \textcolor label gets the default color of the labeled point.
    • Use braces to enclose the text to be colored with your specified color. Otherwise, the color will be applied only to the first character following the closing brace after the color name.
    • Allowed colors seem to be the predefined color names at
       https://en.wikibooks.org/wiki/LaTeX/Colors#Predefined_colors
      (I already tried, unsuccessfully, the other color specification methods described on that page.)
    • Bear in mind that, as an undocumented feature, this may very well be unsupported in the future.

    Bonus: in labels, use the \mathrm command to get roman type inside formatted math text. Example:

    `\mathrm{The\ value\ of\ } x_0 \mathrm{\ is\ } ${x_0}.`

    (As Jules Bonin-Ducharme mentioned above, spaces must be "escaped" with a backslash \ character.)

    An example, using both features mentioned above:

     https://www.desmos.com/calculator/yhyzfdjrcr 

  • 0
    Avatar
    E Simon

    These are great comments and have helped transform the potential of Desmos into an awesome teaching tool for me. Thanks everyone.

    Recently I have been experimenting with dynamic labels and was struggling with adding Greek letters in the label, and Kendra's and Paul Prue's comments above helped me realize you can use some of the other LaTeX commands within the labels, see an example Desmos graph here:

    https://www.desmos.com/calculator/akuanuxulp

    where I successfully added a pi label using the `\pi` LaTeX syntax, and a dynamic x_1 label using `x_1=${x_1}`. I suspect other LaTeX commands summarized here can be used as well in your labels:

    http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html

    I was unsuccessful, however, in adding a dynamic label for my theta_1 slider. Following the format above, I tried `\theta_1 = ${\theta_1}` but the ${\theta_1} is the static Greek letter with subscript 1, and not the numeric value of my theta_1 slider variable.

    Any ideas?

  • 0
    Avatar
    Jules Bonin-Ducharme

    Hi E Simon,

    This might now be exactly what you want but here it is.  You can declare another variable and have it equal your theta_1.

    c = theta_1

    Then put c instead of theta_1 in your label.  See your example tweeked.

    https://www.desmos.com/calculator/lgan9mc3fx

     

  • 0
    Avatar
    Derek Towler

    Having trouble with displaying exponents properly: see below. Any help is very much appreciated!

  • 1
    Avatar
    Jules Bonin-Ducharme

    You have to tell the label to right LaTEX.  The way you do that is with back tick marks `

    See your example fixed here:

    https://www.desmos.com/calculator/b4fjl1g5lq 

  • 0
    Avatar
    E Simon

    Thanks, Jules for your response! What a great workaround! I’ll definitely use that trick on my current project (a general circle calculator), and keep it in my back pocket for future projects. Let me know if you’re interested in seeing it and I’ll share it with you, or I can share it on this forum if others are interested. Lots of dynamic labels!

  • 0
    Avatar
    Gilles Paul

    Is it possible to have a dynamic label display exact values of a variable. I would like the label to display \frac{\sqrt{3}}{2} and not its decimal value. The calculator can't handle strings in a list.

    I can manage to use CL to set a variable to the correct LaTeX expression... but can't find a way for the graph label to access this variable (something like button1.script.value). Is this possible ?

     

     

     

  • 0
    Avatar
    John Bennett

    Hi Gilles,

    I think you would need to set up variable for the radicand and denominator to make it display that way. Check this out and see if it is what you wanted.

    https://www.desmos.com/calculator/we6whcinjw

  • 0
    Avatar
    Gilles Paul

     

    Hi John,

    Thanks. That would work well if all the numbers were of the same format... But my numbers don't have the same format...

    I used the pointLabel attribute to display the correct LaTeX.

    https://teacher.desmos.com/activitybuilder/custom/5bf6b98b7f69616e15bdae1e

Please sign in to leave a comment.
Powered by Zendesk