Tag Info

Hot answers tagged

8

Try this: Plot[Sin[2 x], {x, -Pi, Pi}, AxesLabel -> {"This is\n an axes label", None}] And here's the same using FrameLabel instead of AxesLabel. Plot[Cos[2 x], {x, -Pi, Pi}, Frame -> True, FrameLabel -> {{"This is\n a y frame label",None}, {"This is\n an x frame label", None}}] This is covered in the documentation under Newlines ...


7

I kind of love this stuff and had some relevant code laying around, so... The kite-domino tiling is based the pinwheel tiling which is falls out of a particular decomposition of a right triangle with legs of length 1 and 2. In the code that follows, rt[{a,b,c}] represents such a right triangle and dissect indicates how such a triangle should be decomposed ...


4

EDIT As Mr Wizard observed my original code is not self contained. For reasons that I fail to understand this seemed to work with what seemed a fresh session. The code works if you move the gauge marker but to post correct code (I leave the animated gif as it is the same outcome): DynamicModule[{s = 0}, Framed[Row[{VerticalGauge[Dynamic[s], {0, 1}, ...


2

Manipulate[arrX = ConstantArray[0, {2, 4}]; EventHandler[Dynamic[mat = Reverse[Transpose[arrX]]; Show[frame, MatrixPlot[mat, Mesh -> All, ImageSize -> {100, 200}, PlotRangePadding -> 0, FrameTicks -> None, ColorRules -> {1 -> None, 0 -> None}], Epilog -> ...


2

An alternative to manually setting line breaks is to set a label size and then let the label break as needed: Plot[Cos[2 x], {x, -Pi, Pi}, Frame -> True, FrameLabel -> {{Pane["This is a y frame label", {50, All}], None}, {Pane["This is an x frame label", {50, All}], None}}]


1

Here I figured out a rough, primitive solution to get the work done, still looking forward a smarter solution. labels = {"00", "01", "11", "10"}; lab = {"0", "1"}; Clear[a, b, c, x, y, A, B]; elem = {{! a && ! b && ! c, ! a && ! b && c}, {! a && b && ! c, ! a && b && c}, {a && b ...


1

Here is a workaround for this I've been using: p2 = Graphics3D@First@ParametricPlot3D[{Cos[t], Sin[u], Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}] Now we discretize: DiscretizeGraphics[Normal[p2 /. (Lighting -> _) :> Lighting -> Automatic]]


1

You should prepend to the code of your question << "LevelScheme"` However, this doesn't open with my version of MMA (10.0) As an alternative one could use a = ListPlot[Table[{.1 x, Sinc[.1 x]}, {x, Range@200}], Frame -> True, PlotRange -> {{0, 10}, {0, 1}}, Joined -> False, AspectRatio -> 1.5, PlotLegends -> ...


1

The problem is with your ImageSize->Full option. Try leaving it out or specify your ImageSize to a certain size (e.g. 500) instead of Full. otherOptions = {MaxPlotPoints -> 1000, ColorFunction -> "ThermometerColors", PlotLabel -> Style["Array Plot of Raw Data", 11, Bold, Black], PlotRangePadding -> 0., ImageSize -> Full, ...


1

Perhaps xor[ab : {a_String /; StringFreeQ[a, Except["0" | "1"]], b_String /; StringFreeQ[b, Except["0" | "1"]]}] := StringJoin[ MapThread[Xor, Characters[ab] /. {"0" -> False, "1" -> True}] /. {False -> "0", True -> "1"}] Since xor is limited to two strings in the list it will be convenient to support this form: ...


1

First, a small change in your function fun to allow options: funB[str : {__String}, opts : OptionsPattern[]] := Module[{fs, n, timd}, fs = Riffle[#, #]~Append~Last[#] & /@ ToExpression@Characters@str; n = Length@First@fs; timd = Reverse@fs~Append~PadLeft[{0}, n, {0, 1}]; ListLinePlot[MapIndexed[#1 + 2 First@#2 - 2 &, timd], ...



Only top voted, non community-wiki answers of a minimum length are eligible