Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.4K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How do I plot text instead of points?

Posted 11 years ago
POSTED BY: Brad Varey
3 Replies

Not sure, but I think this is like what you want:

fqData = {<|"Application" -> "Chess", "x" -> 9.0, "y" -> 2.5|>,
   <|"Application" -> "Drive", "x" -> 7.0, "y" -> 8.5|>,
   <|"Application" -> "Chess", "x" -> 2.0, "y" -> 5.5|>}

datasets = GatherBy[fqData, #["Application"] &];

ListPlot[{#["x"], #["y"]} & /@ # & /@ datasets,
 PlotMarkers -> (First[#]["Application"] & /@ datasets),
 PlotRangePadding -> {Scaled[.06], Automatic}]

The plot range needed a little extension to include the names, which are considerably wider than points.

POSTED BY: Michael Rogers
Posted 11 years ago

Thanks.

I had considered Graphics[], but was hoping to leverage ListPlot[], because it gives me access to some options Graphics[] does not on its own (if I understand correctly), like PlotTheme.

And the workbook I am writing contains plenty of other charts where ListPlot[] would be ideal. Sticking to one base plotting function would be best for me.

POSTED BY: Brad Varey
Graphics[
 {Text["Chess", {9, 2.5}],
  Text["Drive", {7, 8.5}]},
 PlotRange -> {{0, 10}, {0, 10}},
 Frame -> True,
 BaseStyle -> {FontSize -> 12}]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard