Message Boards Message Boards

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

getting the co-ordinates from a plot of a function

I have plotted a function in mathematica. I can see the co-ordinates but i want to get them in the form of a table so that i can plot it in origin.How can i achieve this?

If you have plotted a function, then you must have the function definition in the first place. so you can just use the Table command to generate the data. You can also specify the origin using AxesOrigin option. If you really want to get the data from the plot, it depends on the plot type. For Plot you can try

   p = Plot[Sin[x], {x, -Pi, Pi}]
   data = (InputForm@p)[[1, 1, 1, 3, 2, 1]]

   {{-3.14159, -1.28228*10^-7}, {-3.13967, -0.00192716}, {-3.13774, -0.00385419},......

For ContourPlot3D I use data = (InputForm@p)[[1, 1, 1]] There might be better ways, but this is what I know.

POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract