Tag Info

Hot answers tagged

6

Using either Swatchlegend, PointLegend, LineLegend, Barlegend you can easily generate a legend like you would get in a plot. SwatchLegend[{Red, Green, Blue}, {"red", "green", "blue"}] PointLegend[{Red, Green, Blue}, {"red", "green", "blue"}] LineLegend[{Red, Green, Blue}, {"red", "green", "blue"}] BarLegend["Rainbow"] Non-default styles are ...


5

Put[OutputForm[outString], "testOut.txt"] compare with Put[outString, "testOut0.txt"] Alternatively, you can use Export: Export["testOut2.txt", outString] (* or Export["testOut2.txt", outString, "Text"] *) or, WriteStream (thanks: Mr.Wizard) strm = OpenWrite["testOut2.txt"]; WriteString[strm, outString] Close[strm] to get the same result:


5

Update: Generate a separate legend with the default color scheme and export it: lineleg = LineLegend["DefaultPlotStyle"/. (Method/. Charting`ResolvePlotTheme[Automatic, ListLinePlot]), {"leg1", "leg2", "leg3"}]; Export["plotlegend.pdf",lineleg] To get the default colors associated with various PlotThemes you can use the function ...


4

The easiest way (I think) is to set bookmarks. Then Export will interpolate between them. Export["try.swf", Manipulate[ Plot[Sin[2*x + φ], {x, 0, 10}], {{φ, 5.2308285471612335}, 0, 2*Pi}, Bookmarks -> {"start" :> {φ = 0.}, "stop" :> {φ = 2. Pi}}]]


4

You can generate a random signal, if that is indeed what you mean, using a random walk. For example, 1000 samples would look something like this: (* Generate the samples and plot *) samples = Accumulate[RandomReal[{-1, 1}, 1000]]; ListLinePlot[samples] (* And to export them to CSV *) Export["\\path\\to\\file\\randomsamples.csv", samples, "CSV"]; And ...


4

You need to ask yourself a few more questions about what you want. If you want your random numbers to be uniformly distributed in the $(a,b)$ interval, the easiest functions to use are RandomReal to get real numbers, or RandomInteger to get integer values. These functions are similar to the RAND() function in Excel or similar spreadsheets. RandomVariate is ...


2

You can export just the image to EPS by allowing rasterisation with the "AllowRasterization" option in Export. Export["testdata1.eps",t1,"AllowRasterization"->True] Hope this helps.


2

Use Export["data1.mat", WW1] Export["data2.mat", WW2] Is that what you want? Or combined them into a single matrix using Mathematica, then export the whole matrix. But without the double quotes.


2

At the risk of raising a question from the grave its worth noting that this has been clarified/corrected at some point. Its not clear whether it was just a typo in the Help or its later functionality. If you look at the XLSX help, the 4th Basic Example shows the correct syntax with Rules. Export["test2.xls", "Sheets" -> {"list1" -> list1, "list2" ...


2

This is a quick and dirty version for what I think you are trying to do. Note that its not good Stack Exchange practise to keep asking variations of the question. One caveat with the Export help is that most useful stuff is held under each file format - so try looking at the help for XLSX. a = {"WMO44203", "WMO44207", "WMO44212"}; dset = WeatherData[#, ...


1

Personally, in this case I think Do is acceptable. However, an arguably more elegant way of approaching the task, where you don't need to specify the number of elements in plottable, is with MapIndexed. MapIndexed[Export["Plot" <> ToString @@ #2 <> ".pdf", #1, "PDF"] &, plottable] Unlike Do this returns a list of the outputs of Export, ...


1

Finally, after many attempts, I had the answer: the ConversionOptions have to be assigned to "XHTML" and not to "HTML". Indeed, this works: ConversionOptions->{ "ExportOptions"->{"XHTML" -> {"ConversionRules" -> {"ItemNumbered" -> {"<li>", "</li>"}, "Text" -> {"<p class=\"mytext\">", "</p>"}}, ...


1

Export["mobius.stl", mobius] creates the desired file, which I can open with Photoshop CC, producing B&W top and side views. Presumably, more specialized software would give a true 3D image, although still B&W.


1

Whereas the problem above is not solved I finally found a proper formulation of the Klein bottle immersion in 3 dimensions: r = 4 (1 - cos(u)/2) x = Piecewise[({ {r cos(u) cos(v) + 6 (sin(u) + 1) cos(u), 0 <= u < \[Pi]}, {r cos(v + \[Pi]) + 6 (sin(u) + 1) cos(u), \[Pi] <= u <= 2 \[Pi]} })] y = Piecewise[({ {r sin(u) cos(v) + 16 ...


1

You need to set the size of the elements of the scorecard. Have a look at Histogram's ImageSize option. Also you can set your tables in Grid or TableForm wrapped in a Pane or Panel to get them the size you want as well. They have ImageSize options as well. To help with the ImageSize parameters make use of UnitConvert to convert from your know dimensions in ...



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