Repository navigation
Tutorial plots in the course house style; Plotly and Kaleido removed - #44
Merged
Merged
Conversation
Zed shows plots only as images, so plotly() just hid them. The line, its Zed note and the now unused PlotlyBase/PlotlyKaleido (with Kaleido_jll) are gone from the tutorial and the render environment. The production, stock and cost plots become stacked weekly bars in the house style of Introduction-to-Python's lecture 9: brand colors, quiet labels, no frame, week numbers, units on the axes. One helper carries the style per call instead of a global default().
course_style holds the house style of Introduction-to-Python's lecture 9 once; each plot call adds it with `course_style...`, so nothing is set globally. Tutorial 05 now uses it, and 04-03 (production bars), 07 (route map and capacity bars) and 11 (seating grid, both copies) are restyled with it: brand colors, quiet labels, no frame, units on the axes, maps without grid, oxblood only for seating violations, a quiet dashed capacity yardstick. Tutorial 03-05 gains a short section that teaches the four rules behind it and shows course_style at work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
plotly()line in tutorial 05 hid them, and a callout told students to delete it.PlotlyBaseandPlotlyKaleido(plusKaleido_jll) were in the render environment only for that line.HOUSEsettings). These tutorials now follow it, so both courses' plots look the same.What
Commit 1: tutorial 05, Plotly and Kaleido
plotly()and its Zed callout are removed.PlotlyBaseandPlotlyKaleidoare removed fromapplied-optimization/.Pkg.rmalso droppedKaleido_jll,ParametersandUnPack, and no other package changed version.ylims=:roundstart the axis at −10k.Commit 2: one shared style
include/plot_style.qmddefinescourse_styleonce:course_style..., so nothing is set globally.jlfilescourse_styleon the example bar chart.Checked
uv run quarto rendersucceeds for 03-05, 04-03, 05, 07 and 11./code-review highruns:default(), fixed limits that clipped wrong answers, a contrast problem with the violation cross, a misleading override example, a duplicateusing Plots, and repeated hex values (nowcourse_style.background_colorandcourse_style.palette).bar_style, merging tutorial 11's twovisualize_seatingcopies (that duplicate was already there), and eval-only-when-needed for the include.Not in this PR
plotly(), still works with a warning; 07, 11) keep their old plot code.general/faq.qmd:52still mentionsplotly(). That advice is still true and is mirrored in Optimization-with-Julia.