Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16615

Re: Cannot move text with drawing tools

From Alexei Boulbitch <Alexei.Boulbitch@iee.lu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Cannot move text with drawing tools
Date 2014-03-08 07:55 +0000
Message-ID <lfeief$5n3$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


I inserted "New Graphic" and then brought up "Drawing Tools". I inserted text. I then inserted more text using the "Text" tool. The text that I insert is unchangeable and unselectable. It just sits there. In fact, it is not part of the graphic. The cursor changes when moved over this new text, but it's clearly placed within the bounds of the figure.

I'll have to start over.

-Tony

Hi, Tony,

That's why I never draw by hand. I strongly recommend you to draw programmatically. It is a bit slower (not too slower, by the way), but much more exact and gives you more options. What is most important, it is changeable on each step. You may add any feature, or remove any. That is exactly the place where you've got your problem.

Just to have an idea, how to start (if you have no one yet) please find below few simple examples I did as illustrations for some scientific texts:

gr1 = Graphics[{Blue, Disk[{10, 0}, 2]}, ImageSize -> 100];
gr2 = Graphics[{Arrowheads[Large], Arrow[{{0, 0}, {13, 0}}]}];
gr3 = Graphics[{Arrowheads[Large], Arrow[{{0, 0}, {0, 2}}]}];
gr4 = Graphics[{Pink, Opacity[0.5],
    Polygon[{{0, 0}, {9.6, 2*Sqrt[0.96]}, {10, 0}}]}];
gr5 = Graphics[{Pink, Opacity[0.5],
    Polygon[{{0, 0}, {9.6, -2*Sqrt[0.96]}, {10, 0}}]}];
gr6 = Graphics[
   Line[{{0, 0}, {9.6, 2*Sqrt[0.96]}, {10,
      0}, {9.6, -2*Sqrt[0.96]}, {0, 0}}]];

Show[{gr1, gr2, gr3, gr4, gr5, gr6}, ImageSize -> 500]

This one contains a simple graphics with a text:

pl1 = Plot[x^2, {x, 0, 1}, Axes -> None, ImageSize -> 300];
pl2 = Graphics[Arrow[{{0.7, 0.49}, {0.9, 0.49}}]];
pl3 = Graphics[Arrow[{{0.7, 0.49}, {0.82, 0.33}}]];
pl4 = Graphics[Line[{{0.7, 0.49}, {0.77, (0.77)^2}}]];
pl5 = Graphics[Circle[{0.7, 0.49}, 0.06, {0, 0.3*Pi}]];
pl6 = Graphics[{Text[Style["\[CurlyPhi]", 14], {0.79, (0.75)^2}]}];
pl7 = Graphics[{Text[
     Style["V", 14, Italic], {0.91, (0.77)^2 - 0.04}]}];
pl8 = Graphics[{Text[Style["v(s)", 14, Italic], {0.83, 0.28}]}];

Show[{pl1, pl2, pl3, pl4, pl5, pl6, pl7, pl8}]


Below find three 3D images illustrating a molecule clogging a nanopore:


vc = PolyhedronData[#, "VertexCoordinates"] & /@
   PolyhedronData["Platonic"];
mol = (Graphics3D[{Specularity[White, 30], Orange,
        GraphicsComplex[#, Table[Sphere[i], {i, Length[#]}]]},
       Boxed -> False] & /@ vc)[[3]];

top1[x_, y_] := -3 + 0.1*Sin[x + y]*Sin[2 x - y];
bottom1[x_, y_] := -3.3 + 0.1*Sin[x + y]*Sin[2 x - y];

top2[x_, y_] := 0.1*Sin[x + y]*Sin[2 x - y];
bottom2[x_, y_] := -0.3 + 0.1*Sin[x + y]*Sin[2 x - y];

top3[x_, y_] := -1.7 + 0.1*Sin[x + y]*Sin[2 x - y];
bottom3[x_, y_] := -2 + 0.1*Sin[x + y]*Sin[2 x - y];

pl1 = RegionPlot3D[
   bottom1[x, y] < z < top1[x, y] \[And] -10 < x < 10 \[And] -10 < y <
      10, {x, -10, 10}, {y, -10, 10}, {z, -3.3, 1}, PlotPoints -> 50,
   Boxed -> False, Axes -> False, ImageSize -> 250, Mesh -> None,
   ViewPoint -> {1/2, 1/4, 0.1}];

pl2 = RegionPlot3D[
   bottom2[x, y] < z < top2[x, y] \[And] -10 < x < 10 \[And] -10 < y <
      10, {x, -10, 10}, {y, -10, 10}, {z, -0.3, 2}, PlotPoints -> 50,
   Boxed -> False, Axes -> False, ImageSize -> 250, Mesh -> None];

pl3 = RegionPlot3D[
   bottom3[x, y] < z < top3[x, y] \[And] -10 < x < 10 \[And] -10 < y <
      10, {x, -10, 10}, {y, -10, 10}, {z, -3.1, 2.2},
   PlotPoints -> 50, Boxed -> False, Axes -> False, ImageSize -> 250,
   Mesh -> None, ViewPoint -> {1/2, 1/4, 0.1}];

gr2 = Graphics3D[{Yellow, Cylinder[{{0, 0, -0.3}, {0, 0, 0.2}}, 2]}];
gr1 = Graphics3D[{Yellow, Cylinder[{{0, 0, -3.3}, {0, 0, -2.8}}, 2]}];
gr3 = Graphics3D[{Yellow, Cylinder[{{0, 0, -2}, {0, 0, -1.5}}, 2]}];
arrow1 = Graphics3D[{Thick, Blue,
    Line[{{-5, -3,
       1}, {-5, -3, -1.5}, {-5.2, -3.2, -1.1}, {-5, -3, -1.5}, {-4.8, \
-2.8, -1.1}}]}];
arrow2 = Graphics3D[{Thick, Red,
    Line[{{-5, -3, -1.2}, {-5, -3, 1.3}, {-5.2, -3.2, 0.9}, {-5, -3,
       1.3}, {-4.8, -2.8, 0.9}}]}];

text1 = Graphics3D[Text[Style["E", 18, Italic], {-5.5, -3.5, -0.3}],
   ImageSize -> 400];
text2 = Graphics3D[{Red, Thick,
    Text[Style["E", 18, Italic], {-5.5, -3.5, -0.3}]}];

Show[{mol, gr1, pl1, arrow1, text1}]
Show[{mol, gr2, pl2}]
Show[{mol, gr3, pl3, arrow2, text2}]

Have fun,

Alexei


Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

Re: Cannot move text with drawing tools Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2014-03-08 07:55 +0000

csiph-web