Skip to main content
added 794 characters in body
Source Link
azerbajdzan
  • 35.1k
  • 2
  • 30
  • 80

New version: (after @Domen's useful comment)

fu1 = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 
     2 Pi]}];

fu2 = Function[{x}, {Splice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

(* tooltip t *)
ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}, 
 CoordinatesToolOptions -> {"DisplayFunction" -> fu1}, 
 ImageSize -> Small]

(* tooltip x, y, t *)
ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}, 
 CoordinatesToolOptions -> {"DisplayFunction" -> fu2}, 
 ImageSize -> Small]

enter image description here

enter image description here

Old version:

There is undocumented "CoordinatesToolOptions" -> Identity which specifies the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying x, y, t is required then definition of fu is:

fu = Function[{x}, {Splice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

enter image description here

There is undocumented "CoordinatesToolOptions" -> Identity which specifies the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying x, y, t is required then definition of fu is:

fu = Function[{x}, {Splice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

enter image description here

New version: (after @Domen's useful comment)

fu1 = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 
     2 Pi]}];

fu2 = Function[{x}, {Splice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

(* tooltip t *)
ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}, 
 CoordinatesToolOptions -> {"DisplayFunction" -> fu1}, 
 ImageSize -> Small]

(* tooltip x, y, t *)
ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}, 
 CoordinatesToolOptions -> {"DisplayFunction" -> fu2}, 
 ImageSize -> Small]

enter image description here

enter image description here

Old version:

There is undocumented "CoordinatesToolOptions" -> Identity which specifies the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying x, y, t is required then definition of fu is:

fu = Function[{x}, {Splice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

enter image description here

added 8 characters in body
Source Link
azerbajdzan
  • 35.1k
  • 2
  • 30
  • 80

There is undocumented "CoordinatesToolOptions" -> Identity which specifyspecifies the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying {x, y}, t is required then definition of fu is:

fu = Function[{x}, {xSplice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}]];

enter image description hereenter image description here

There is undocumented "CoordinatesToolOptions" -> Identity which specify the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying {x,y}, t is required then definition of fu is:

fu = Function[{x}, {x, 
   Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}]

enter image description here

There is undocumented "CoordinatesToolOptions" -> Identity which specifies the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying x, y, t is required then definition of fu is:

fu = Function[{x}, {Splice@x, 
    Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

enter image description here

added 254 characters in body
Source Link
azerbajdzan
  • 35.1k
  • 2
  • 30
  • 80

There is undocumented "CoordinatesToolOptions" -> Identity which specify the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying {x,y}, t is required then definition of fu is:

fu = Function[{x}, {x, 
   Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}]

enter image description here

There is undocumented "CoordinatesToolOptions" -> Identity which specify the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

There is undocumented "CoordinatesToolOptions" -> Identity which specify the function applied to coordinates {x, y}. Unfortunately I could not figure out how to set it straight within ParametricPlot so I had to use awkward method with ToString, FullForm, StringReplace and ToExpression.

Another issue is that it seems to be quite hard to figure out the definition of function fu that transforms {x, y} into parameter t.

But if all is done correctly it works nicely like the default behaviour.

pl = ParametricPlot[{Cos[t], Sin[2 t]}, {t, 0, 2 Pi}];

spl = ToString@FullForm@pl;

fu = Function[{x}, {Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}];

ToExpression[
 StringReplace[spl, 
  "Rule[\"CoordinatesToolOptions\", Identity]" -> 
   ToString@FullForm@Rule["CoordinatesToolOptions", fu]]]

enter image description here

If displaying {x,y}, t is required then definition of fu is:

fu = Function[{x}, {x, 
   Mod[2 ArcTan[x[[1]] (1 + x[[1]]), x[[2]]/2], 2 Pi]}]

enter image description here

Source Link
azerbajdzan
  • 35.1k
  • 2
  • 30
  • 80
Loading