Message Boards Message Boards

0
|
9502 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How do I extract data in .txt format from a DensityPlot?

Posted 9 years ago

Hello all,

If I have a DensityPlot of a function, how can I extract the data in .txt format?

Here is a simplistic version of what I have:

F = x^2 + y^2;
DensityPlot[(F), {x, -20, 20}, {y, -20, 20}, 
 ColorFunction -> "Rainbow", PlotPoints -> 100, PlotRange -> Full, 
 PlotLegends -> Automatic]

Thanks a lot!

POSTED BY: Sid D

Does this work for you?

F = x^2 + y^2;
Export["densitydata.tsv", Table[(F), {x, -20, 20}, {y, -20, 20}]]

I've attached a copy of the file it produces.

Attachments:
POSTED BY: Jesse Friedman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract