Tag Info

Hot answers tagged

20

There is a public, but undocumented, function called GeometricFunctions`DecodeFilledCurve which helps to decode this type of undocumented FilledCurve: GeometricFunctions`DecodeFilledCurve[ FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{12.887695983062486, 5.160000000000004}, {1.8237311169604027, 5.160000000000004}, ...


18

Go into the option inspector, and try the different settings for Graphics Options > RenderingOptions > "Graphics3DRenderingEngine and see if that has any effect. Edit This option can be set on a per-graphic basis, say by using Style: AbsoluteTiming[ Rasterize[ Style[Graphics3D[{Opacity[0.1], Sphere[{0, 0, 0}, #] & /@ Range[20]}, ...


16

I think it must be an oversight in the graph export code (it also happens when exporting to graph formats other than Graphlet). If you use explicit labels in Mathematica, it gets exported properly, just the implicit VertexLabels -> "Name" does not. Note that since the export formats do not have an equivalent of VertexLabels -> "Name", you'd expect the ...


15

Short answer: I hope Export["foo.pdf", plot,Background->None] fixes it. Let's get there step by step. First, Acrobat X Pro on my Mac reports that both your PDF files are fine. They print fine, and pass all tests with flying colors. I uncompressed the PDF (thanks pdftk) and a diff on them reveals that one weird object that only appears in your ...


15

You can use Graph itself much like Show. However, you pass the essential data from the graph as the first argument, rather than the graph itself. (Graph[g,....] will not work.) g = Graph[{1 -> 8, 1 -> 11, 1 -> 18, 1 -> 19, 1 -> 21, 1 -> 25, 1 -> 26}, VertexLabels -> "Name", ImagePadding -> 10] Graph[EdgeList[g], ...


15

This happened to me too and apparently, is a problem with the student version. Arnoud helped me figure out a work around for this. In your $UserBaseDirectory/Licensing, you should find a mathpass file that looks something like this: (*userregistered*) machineName1 ID ActivationKey1 Expiration1 UserName machineName2 ID ActivationKey2 Expiration2 UserName ...


15

Unfortunately, there is no solution. Dump (.mx) files are explicitly documented as being non-portable between different versions, and even between different builds of the same version (e.g. 32- and 64-bit versions for a given platform, or those for two different platforms). As such, you must re-generate your .mx files for version 9 either from the original ...


13

You could use SetProperty. For example g = Graph[{1 -> 2, 2 -> 4, 3 -> 4}] SetProperty[g, VertexLabels -> {"Name", 2 -> "Two"}]


13

Changing shortcuts isn't that complicated. All you have to do is change one line in the file KeyEventTranslations.tr in a location in your file system specified by this command: FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "TextResources", $OperatingSystem}] Locate the following line in a text editor and change the key into the one ...


13

This is fixed in version 9. This came up on MathGroup before. Since it hasn't been fixed for so long, I wasn't sure if it was really a bug, so I did some spelunking (and some speculation) today to find out what's happening. To jump to the end: I think it's a bug. First, let's see what arguments does LogLinearPlot really pass to the function: ...


12

Actually, as we can use Tooltip on elements directly this is a cleaner method: label = Tooltip[{##2}, Grid[{ {"Name", #}, {"Usability ", #2}, {"Relevancy", #3}, {"Market Size", #4} }, Frame -> All, Alignment -> Left ]] &; BubbleChart[ label @@@ data3, ChartStyle -> 24 ] How about this? ...


12

One hack-ish method for evaluating an inverse CDF is to use the event location functionality of NDSolve[]. As an example: dist = HyperbolicDistribution[2, 3/2, 1, 0]; c0 = N[CDF[dist, 0], 20] 0.058032099055437685722 Suppose that we want to evaluate the inverse CDF for this particular hyperbolic distribution at the $p$-value $7\times10^{-6}$. Since this ...


12

You need to first do a series connection of the PID controler to the plant. This gives the open loop transfer function. Then do a unity feedback connect to close the loop, like this plant = StateSpaceModel[{x''[t] == u[t] - x'[t]}, {{x''[t],0}}, {{u[t], 0}}, x[t], t]; kip = 5; ki = -0.00001; kid = 0.01; pid = TransferFunctionModel[(kip*s + ki + kid*s^2)/s, ...


11

Suppose we have a Graphics object which depends on some parameters and a controller with which we want to control these parameters. This could be done easily enough using the second argument of Dynamic, for example gr[pts_, col_, radius_] := Graphics[{col, Disk[#, radius] & /@ pts}, PlotRange -> {{0, 3}, {0, 3}}, ImageSize -> 200]; contrl = ...


11

Looks like a bug in V8.0.0 that was fixed in V8.0.1. Seems to be triggered in part when the argument is a packed array: (* V8.0.0 *) In[2]:= digits = Reverse@IntegerDigits[1000]; In[3]:= LengthWhile[digits, 0 === #&] Out[3]= 0 In[4]:= LengthWhile[Developer`FromPackedArray[digits], 0 === #&] Out[4]= 3 which would explain why it worked when ...


11

It works just fine for me, and I am on windows 8. Nothing more to say really. Screenshot:


11

This is not simply a mislabeling of the axes. More than that is going on: the plot produced is not even logarithmic. Let's try to use the default (non-log-transformed tick marks): First, with MachinePrecision (correct result): Show[ LogPlot[Abs[E^x - poly], {x, -1, 1}, WorkingPrecision -> MachinePrecision], Ticks -> Automatic ] Then with ...


10

This isn't perhaps exactly what you are looking for but here are some points worth noting. In version 8 NExpectation uses numerical integration and summation methods whereas N[Expectation[...]] uses direct integration or summation and then approximates numerically after the fact. Though the idea is for data-distributions in M to behave just like regular ...


10

This appears to be a genuine bug with exact arithmetic in Eigensystem. Here is a comparison to the same calculation with real numbers, for which I use the matrix mat//N: mat = {{7/2 - I/2, -1 + I, 1/2 + 5 I/2}, {-1 + I, 5 + I, -1 + I}, {1/2 + 5 I/2, -1 + I, 7/2 - I/2}}; {vals, vecs} = Eigensystem[mat] (* ==> {{6, 3 + 3 I, 3 - 3 I}, {{1, -2, 1}, ...


10

Something like this? It does just what you suggested: export the file and then place a FileDrop reference to it on the clipboard. Needs["NETLink`"]; InstallNET[]; LoadNETType["System.Windows.Forms.DataFormats"]; LoadNETType["System.Windows.Forms.Clipboard"]; exportToClipboard[graphics_] := Module[{dob, file}, file = FileNameJoin[{$TemporaryDirectory, ...


9

After consulting a friend of mine P.M. I can tell you this. First of all as @Szabolcs @ruebenko already mentions - in order to get a comparison with Wavelet explorer (v7) to v8, you can go to the following link in the documentation center which shows how the syntax has changed: ...


9

You might also have luck if you specify the ImageSize Export[filename, plot, "PDF", ImageSize -> 8*72] I have also been able to print files when using the Print As Image option (under Advanced from the Print menu of Adobe).


9

Here is a considerable simplification of Liam's accepted answer. It avoids the need to create and compile a C# program. This is basically just a small modification to Simon Woods' answer, so that it writes directly to the clipboard instead of creating a temporary file on disk. This avoids the need to clean up the file afterward. Needs["NETLink`"] ...


9

You need to be very careful of simplifying equations with numeric quantities. Compare: Simplify[1.0 x == 0.9999999999999 x] Simplify[1.0 x == 0.99999999999999 x] x == 0 True In the first case Simplify divide by very small number that produce x == 0. This division is allowed with Simplify[... == ...]. The same way FullSimplify[... == ...] (without ...


8

So I agree with everyone. It seems to be a bug in version 8. I have managed to do a (rather ugly) work around, but it does the job. Basically I define an interpolation function based on the data: thetaplot = Table[tt,{tt,0,2*Pi,2*Pi/300}] interpfunc = Interpolation[Transpose[{thetaplot,dpdOt}]]; And then plot using the interpolation function. ...


8

Just in case somebody else needs it, here is a compiled answer. Thanks go out to 0x4A4D (for the actual solution), Michael Pilat (for the JLink part) and everybody else in here for the swift responses. Since this is apparently a bug of sorts in Mathematica 8, percent encoding the Greek letters in the URL will have to do. Reciting Michael Pilat's code ...


8

We need an appropriate complexity function. There were a few questions on this topic but in general, it is not obvious how to design an adequate function and it may appear quite difficult. Moreover there have been certain hidden changes of ComplexityFunction in Mathematica 9 (see: FullSimplify does not work on this expression with no unknowns. By default ...


7

You can also use hotstrings as a way of autocompletion. By using such replacements, words are immediately replaced by another word on typing a space after the hotstring: CreateDocument[{}, InputAutoReplacements -> {"sync" -> SynchronousInitialization}] You can set such replacements globally under Option Inspector (CtrlShiftO). Of course no one would ...


7

I'm answering mainly to show solidarity with the idea, although my own efforts at finding a systematic upgrade path with graceful degradation to older versions have ultimately been overtaken by the amount of new and different functionality introduced starting with version 6. Particularly version 6 was a real nuisance because it was so different from both: ...


7

I thought this might be useful information for users. WRI tech support say this is a bug. However if you open the exported PDF in the open source PDF reader Evince then you can print.



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