Tag Info

Hot answers tagged

22

Yes it can. Now it's not necessarily easy, but all the groundwork is in place to build a function that can export ESRI shapefiles. (A lot of code follows....) UPDATE: Available on GitHub as a Wolfram Language Package. See here. First, a shapefile consists of at least three essential files: 1) the .shp main file, 2) the .shx index file, and 3) the .dbf--a ...


7

I consider this question pretty much answered by @MarcoB, as follows: Mathematica 10 apparently forces rasterization by default when exporting 3D graphics to PDF, even when one adds the option "AllowRasterization" -> False to Export. The only way to disable it is to use the Inset workaround suggested by Jens: Export["PDFTestExport.pdf", ...


6

Although you have set the option PlotRangeClipping -> True, you didn't actually specify a PlotRange. This forces Graphics to determine the appropriate range automatically. The default for PlotRange is All, so the result of the Export command is actually correct. The notebook display is not correct. But if you want the notebook display to show the ...


4

How about SetDirectory["D:Experiments\\"]; names = FileNames["*.txt"]; Do[ data = Import[name, "Table"]; range = Select[data, 400 < #[[1]] < 550 &]; smooth = Interpolation[range, InterpolationOrder -> 3]; ex = Table[{x,smooth[x]}, {x, 400, 550, 0.050}]; Export[FileBaseName[name]<>"-out.txt", ex, "Table"];, {name, ...


3

It turned out to be, as LLIAMNnYP suggested, a precision issue. The data I had contained values such as (in FullForm) ...


2

Here is an answer using a small amount of the two example data files you supplied. Read the first 4 lines of each file: h = Import[#][[1 ;; 4, {1, 4}]] & /@ FileNames["/SampleData/Heat*"]; Transpose, flatten and export the data: Export["/SampleData/heatcombarrayex.csv", Flatten/@Transpose@h] The issue you were having is that when you transpose ...


1

Chen, use the following in the terminal and both codes should work just fine: math -nohup -run "<<tmp.m" > output any error messages will be in the file "output". When I run this, I get both the excel sheet and the PDF. Now, if you try to export graphics without a frontend you can sometimes run into trouble, but you'll find any error messages ...


1

I've stumbled a workaround by specifying a "direction vector" through the Text function instead of through Rotate: Show[Plot[x, {x, 0, 1}], Graphics[{Text["test", {0.5, 0.5}, Automatic, {1, 0.5}]}]] Export["~/tmp.pdf", %]


1

I would suggest the workaround to create smaller files and use the sum of FileByteCount[] of each file as a check while exporting.


1

The use of ExportString and/or ImportString, which in fact just use Export and Import on temporary files, seems to trigger dynamic updates. Front-End options get changed and perhaps some variables, and it must be that some of these are tracked. It's difficult to know whether they ought to be or not. In any case, a side effect is the continual updating of ...



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