I would like to know how to make a smiley face in Mathematica.
$\begingroup$
$\endgroup$
4
Well, obviously you need to just plot the equation of a smiley face:
Show[Plot[y /. #, {x, -12, 12}, PlotPoints -> 100] & /@
Solve[
(x^4 + 2 x^2 y^2 - 4/10 x^2 y - 163/4 (x^2 + y^2) + y^4 - y^3 + 25 y + 1575/4) ((x + 3)^2 + (y - 7)^2 -1) ((x - 3)^2 + (y - 7)^2 - 1) ((x)^2 + (y - 2)^2 - 64) == 0,
y], ImageSize -> 500, Axes->False, Frame -> False, AspectRatio -> 1,PlotRange->All]
-
$\begingroup$ For
10.2.0 for Microsoft Windows (64-bit) (July 7, 2015)
, the optionPlotRange -> All
is needed. $\endgroup$ – bbgodfrey Sep 7 '15 at 13:31 -
$\begingroup$ Thanks for catching that, I have that setting in my
init.m
$\endgroup$ – Jason B. Sep 7 '15 at 13:35 -
$\begingroup$ Jason, the OP's question is a bit unclear, but going off the title it seems to ask how to style data points in a plot as smiley faces, rather than just plotting a giant one. I'm not sure that this is a direct answer to the OP's question then. Perhaps you could include a solution for the data marker problem as well which has been proposed in comments, just to be sure. $\endgroup$ – MarcoB Sep 7 '15 at 15:05
-
$\begingroup$ Yeah, I couldn't really tell what he was asking. If that's what he wants, the answer was given in the comments to his question. I just thought this was more interesting :-) $\endgroup$ – Jason B. Sep 7 '15 at 15:10
$\begingroup$
$\endgroup$
I'm making ubpdqn's suggestion an answer.
ListPlot[Table[n^(1/p), {p, 4}, {n, 10}], PlotMarkers -> Style["\[HappySmiley]", 25]]
Style["\[HappySmiley]", 100]
? $\endgroup$ – Kuba♦ Sep 7 '15 at 7:16PlotMarkers
option inListPlot
, e.g. fordat== RandomReal[{0, 1}, {10, 2}];
Try:ListPlot[dat, PlotMarkers -> {Style[\[HappySmiley], Red], 40}]
$\endgroup$ – ubpdqn Sep 7 '15 at 7:17