observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Unexpected Plot Output in Electricity Guide (2 of 6) #604

Closed homerhanumat closed 8 months ago

homerhanumat commented 8 months ago

Describe the bug

In Part 2 (of 6) of the Guide "Electricity use vs. temperature", when one modifies the plotting code as directed the legend shows up but the line colors remain black. (See attached screenshot.)

To Reproduce

Steps to reproduce the behavior:

  1. Go to "Electricity use vs. temperature"
  2. Go to 2 of 6
  3. Copy the suggested text from the right sidebar.
  4. In the plot code-cell, delete the closing ].
  5. Paste the suggested text.
  6. Run the cell.

Expected behavior

Plot shown with legend and lines colored accordingly.

Screenshots

Screenshot 2023-10-30 at 9 08 10 AM

Desktop (please complete the following information):

Additional context

Also, when one presses the Show Me button, the plot appears in the expected way, but it in the code-cell one for the plot can remove the colors option, run the cell, and still the plot shows up with legend and colors.

mootari commented 8 months ago

Take a closer look at the second paragraph in the step description:

First, change the z: "city" assignment in the Plot.lineY call to stroke: "city". This assigns different colors to the two cities.

homerhanumat commented 8 months ago

Ah, sorry.

mootari commented 8 months ago

No worries! Thanks for taking the time to create this issue, and please let us know if you have any other feedback regarding the guides. 🙂