cheatsheets icon indicating copy to clipboard operation
cheatsheets copied to clipboard

Add markers to basic plot image

Open timhoffm opened this issue 4 years ago • 6 comments

Closes #16.

Preview: grafik

timhoffm avatar Jul 07 '20 17:07 timhoffm

If we really want markers over the plot, it should be orange and placed over the sine. Else, it's confusing because it suggests you can to have two different plots with one command.

rougier avatar Jul 08 '20 05:07 rougier

With two datasets I want to stress that plot() can make marker-only plots as well. I consider this important because otherwise people wanting to draw markers only would be guided to scatter(), which is not the right function for plotting simple functional dependencies with markers (c.f. https://github.com/matplotlib/cheatsheets/issues/16#issuecomment-655112085).

Side note: You can actually draw two plots with one command (either using plot(x, y, x2, y2) or plot(x, y) where y is an 2D array, columns containing the datasets). So it's not wrong if that's insinuated. But it's not my main point and I personally don't think it's the major conclusion people from the suggested image.

timhoffm avatar Jul 09 '20 20:07 timhoffm

You can actually draw two plots with one command

I don't think we should highlight that particular feature!

I agree with @rougier here, the rest of the entries are 1:1 of plotting command to the atomic (ish) graphic you get from that element so am :-1: on this change.

I'm 50/50 including a markers on the organge sin and 50/50 on adding another entry to the column,

tacaswell avatar Jul 22 '20 15:07 tacaswell

The overall motivation is to avoid the association: plot is for lines and scatter is for markers, which the current simplification inevitably would promote.

An important question for the styling is the intended direction of the mapping: Does the section list visual plots and annotate them with the needed command? Or does section list our plot commands and the images are illustrations?

Possible solutions:

  • Add a second data line to the plot [timhoffm] Downside: People have to realize that the picture shows two datasets with different plot variants. IMHO different color and function do help here.
  • Draw the single data set with lines and points [rougier, 0.5 * tacaswell] Downside: People have to realize that the style can be adapted from lines-and-markers to lines-only and markers-only.
  • Add an additional plot [0.5 * tacaswell] Downside: There's already very little space.

timhoffm avatar Jul 25 '20 22:07 timhoffm

I prefer 1, but I suspect rougier doesn't like the second color. I don't see the confusion with the second data set, or having two plot commands in the same section.

jklymak avatar Jul 25 '20 22:07 jklymak

I think we should keep it simple since we cannot show everything on cheat sheets. Even the markers on the first plot might be confusing. This of course tends to suggest that for scatter plot you have to use the scatter command, but the cheatsheet might be not the place to explain this is not really the case.

rougier avatar Aug 03 '20 07:08 rougier