Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14894 > unrolled thread
| Started by | W Craig Carter <ccarter@MIT.EDU> |
|---|---|
| First post | 2013-06-16 09:12 +0000 |
| Last post | 2013-06-16 09:12 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Getting the plotted data from a graph W Craig Carter <ccarter@MIT.EDU> - 2013-06-16 09:12 +0000
| From | W Craig Carter <ccarter@MIT.EDU> |
|---|---|
| Date | 2013-06-16 09:12 +0000 |
| Subject | Re: Getting the plotted data from a graph |
| Message-ID | <kpjvia$9na$1@smc.vnet.net> |
Hello Lily,
This should do what you are looking for:
plot = Plot[Sin[x], {x, -Pi, Pi}, PlotStyle -> None, Axes -> False,
Mesh -> All, MeshStyle -> Directive[PointSize[Medium]]]
points = Flatten[Cases[plot, GraphicsComplex[a_, ___] -> a, Infinity],
1]
W Craig Carter
Professor of Materials Science, MIT
On Jun 15, 13, at 4:24 AM, Lily T. wrote:
> Dear All,
>
> My question is regarding the plotted data points in a graph. Assume =
you draw a graph of sinx as:
>
> g1 = Plot[Sin[x], {x, -Pi, Pi},
> Frame -> True, FrameLabel -> {"x", "y"}, ImageSize -> 2.6*72
> ]
>
> then how can I get all of the data points of this graph by using =
mathematica?
>
> This is really important for me and I couldn't find the answer =
anywhere online!
>
> Thank you for your help in advance!
>
> Best,
> Lily
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web