Tag Info

Hot answers tagged

17

If you are serious about using this extensively, consider making a function based on CreateDocument... Here is one way to pursue Szabolcs's line of thought. What follows is a function based on CreateDocument[] that can be used in conjunction with the (now somewhat neglected) option DisplayFunction, which handles where the output of graphics functions ...


14

You can always create a new notebook and put things in it. If you are serious about using this extensively, consider making a function based on CreateDocument that sets the appropriate options for the notebook to look good. Check what CreateDocument@Plot[Sin[x],{x,0,10}] does. Or use a quick-and-dirty hack based on CreatePalette: fig = CreatePalette[#, ...


14

data = Import["orbit3d.out", "Table"]; (* Your Table is not needed; you can use [[...]] instead *) (*d=Table[{data[[i,2]],data[[i,3]],data[[i,4]]},{i,1,Length[data]}];*) d = data[[All, 2 ;; 4]]; l = Line[d]; (* Projections on bounding box *) lz = l /. {x_, y_, z_} -> {x, y, -5.5}; ly = l /. {x_, y_, z_} -> {x, 5.5, z}; lx = l /. {x_, y_, z_} -> ...


9

I took another stab at the problem to produce a self-contained function that generates axes as well as rescales the data. The function nplot is defined below. It takes a list of data as input Clear[nplot] nplot[data_?(ArrayQ[#, 2, NumericQ] &), ImageSize -> size_] := Module[ {rescaled, plot, axes}, rescaled = Transpose@(Rescale /@ ...


9

Here's a start: parallelPlot[dat_] := ListPlot[dat, Prolog -> Table[Line[{{i, Min[dat]}, {i, Max[dat]}}], {i, Length[dat[[1]]]}], PlotStyle -> Table[Blend[{Red, Blue}, Rescale[dat[[i, -1]], {Min[dat[[All, -1]]], Max[dat[[All, -1]]]} ]], {i, Length[dat]}], Joined -> True, Axes -> False ] Test: ...


5

Below are a bunch, although they seem to be a compilation of options for many or all plotting functions, including (mainly) 3D functions. As @belisarius remarked in a comment, using ?NumericQ is the standard way to prevent symbolic analysis, if indeed Plot is doing such. Use something like nf[x_?NumericQ] := f[x]; Plot[f[x], {x, a, b}] Without a ...


5

Clear[xp] xp[t_, r_, t0_, x0_] := x[t] /. First[NDSolve[{x'[t] + r x[t] == 0, x[t0] == x0}, x[t], {t, 0, 10}]]; Manipulate[ ClickPane[ Plot[g, {t, 0, 10}, PlotRange -> 1, Frame -> True, PlotLabel -> Dynamic[MousePosition["Graphics"]], Epilog -> {PointSize[Large], Point[sp]}], ...


4

The function Txk[x,k,n] calculates the contribution of the k^th zero at position x. The parameter n governs how many terms in the sum are used. This corresponds to Havil's equation on the bottom of page 196 of his book Gamma. Note that ExpIntegralEi should be used as @Guesswhoitis suggests, and as discussed here. I think there is a typo in the book, hence ...


4

Mathematica's special technique for handling complex values in a plot is to simply ignore them -- it plots nothing for at values of the domain for which the range is complex. Experiment with the following code. Manipulate[ PolarPlot[r[t], {t, min °, max °}, PlotRange -> {{0, 3.5}, {-1.5, 1.5}}, PlotRangePadding -> Scaled[.05], Epilog ...


3

Needs["ErrorBarPlots`"] data = {{34.2, 8.83, 5.8, 4.2, 1.3362, 1.3362}, {44.3, 3.02, 5.7, 4.3, 0.4324, 0.4324}, {54.3, 1.33, 5.7, 4.3, 0.190427, 0.190427}, {64.5, 0.615, 5.5, 4.5, 0.088054, 0.088054}, {78.1, 0.273, 11.9, 8.1, 0.03908765, 0.039087651}, {98.6, 0.0861, 11.4, 8.6, 0.014199975, 0.014199975}, {122.0, 0.0279, 18, 12, ...


3

I cannot reproduce the behavior you observe in my version of Mathematica (10.2 on Win7-64), so I assume that you might be working on an older version. It would be interesting if you could add your version and platform to your question for reference. Nevertheless, in my opinion the problem seems to be that the plotting function is attempting to evaluate ...


3

This works much faster: f[P_?NumericQ] := x /. FindMinimum[(0.5*x^2 + Cos[y + P] - 1)^2, {x, y}][[2]] Plot[f[P], {P, 0, 100}] It is possible to run it even faster if you will use a successive plotting algorithm (not the algorithm Plot uses) and provide optimal starting values for FindMinimum on each new step on the base on the optimal values found ...


2

Edit 2 : Improved Version Firstly I'm renaming your data set b as b1. Create a new data c such that c = a + (10*b1); I'm scaling the data set b1 according to the axis you wanted. Create a barchart for c Plot3 = BarChart[c, BarSpacing -> {0, 1}, Frame -> Left, FrameTicks -> All, BarOrigin -> Bottom, ChartStyle -> {Darker[Red], ...


1

Here are the modifications that need to be done on your plots h1 and h2 in order to flip them over the line y == x. If you look "under the hood" at the structure of these two plots by executing, for instance, FullForm@Normal@h1 you find that really there are only two objects, a Line and a Polygon. Both of these Heads take inputs which are lists of {x, y} ...


1

Perhaps BarChart3D using the "Grid" option for ChartLayout may be more useful for your aim, e.g. mat = {{1, -1, 0, 0}, {-1, 2, 0, -1}, {0, 0, 1, -1}, {0, -1, -1, 2}}; BarChart3D[mat, ChartLayout -> "Grid", ChartLabels -> {Range[4], Range[4]}, LabelingFunction -> (Placed[Style[#, Red, Bold], Above] &), ChartStyle -> Blue] or just ...


1

The question is not clear, so far, but I assume you mean the PlotLegends and not PlotLabel. Mathematica 10 ParametricPlot[ {.5, t} , {t, 0, .5} , PlotStyle -> Blue , PlotLabel -> "here the plot Label" , PlotLegends -> {"here your legend"} , FrameLabel -> {"botoom", "left", "top", "right"} , PlotTheme -> "Detailed" ] ...



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