1
$\begingroup$

I would like to know how to make a smiley face in Mathematica.

$\endgroup$
4
  • 4
    $\begingroup$ Style["\[HappySmiley]", 100] ? $\endgroup$ – Kuba Sep 7 '15 at 7:16
  • 7
    $\begingroup$ You can use PlotMarkers option in ListPlot, e.g. for dat== RandomReal[{0, 1}, {10, 2}]; Try: ListPlot[dat, PlotMarkers -> {Style[\[HappySmiley], Red], 40}] $\endgroup$ – ubpdqn Sep 7 '15 at 7:17
  • 1
    $\begingroup$ See on WDP Search results for "smiley" $\endgroup$ – user9660 Sep 7 '15 at 8:51
  • 1
    $\begingroup$ See on Alpha smiley plane curve $\endgroup$ – user9660 Sep 7 '15 at 8:52
4
$\begingroup$

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]

enter image description here

$\endgroup$
4
  • $\begingroup$ For 10.2.0 for Microsoft Windows (64-bit) (July 7, 2015), the option PlotRange -> 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
4
$\begingroup$

I'm making ubpdqn's suggestion an answer.

ListPlot[Table[n^(1/p), {p, 4}, {n, 10}], PlotMarkers -> Style["\[HappySmiley]", 25]]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.