Message Boards Message Boards

0
|
1708 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Use CallOut function on a visualisation?

Posted 5 years ago

Hi guys, I need help on visualization. As a simple example below I want to label the interceptions and local max & min points using CallOut. However I think the output is ugly and I want to omit the curly brackets in the labels - how can this be done? I tried different approaches, but no success yet. TIA Torbjorn

(*Functions*)
        ff[x_] := .3 x^3 - x^2 + 3;
        gg[x_] := ff'[x];

        (* solving interceptions between the functions (p) and local max & \
        min points (q)*)
        soln = Solve[ff[x] == gg[x], x, Reals] // N;
        p = {x, gg[x]} /. soln;

        soln2 = Solve[gg[x] == 0, x, Reals] // N;
        q = {x, ff[x]} /. soln2;

        (* the plot*)
        Show[{Plot[{ff[x], gg[x]}, {x, -1.1, 4.5}, PlotStyle -> {Blue, Red}, 
           PlotRange -> All],
          ListPlot[p, PlotStyle -> {Black}, 
           LabelingFunction -> (Callout[NumberForm[#, {4, 1}], Top, 
               CalloutMarker -> "Circle", Appearance -> "Label"] &)],
          ListPlot[q, PlotStyle -> {Red}, 
           LabelingFunction -> (Callout[NumberForm[#, {4, 1}], Top, 
               CalloutMarker -> "Arrow", Appearance -> "Label"] &)]},
         Axes -> {True, False}]
2 Replies

Thanks, exactly what I needed!

Try adding a Column, or Row in the Callout:

Callout[NumberForm[Column@#, {4, 1}],
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract