Matplotlib Plot Not Showing? How to Fix plt.show()
Fix a Matplotlib figure that never appears: a missing plt.show(), the Agg backend, a headless server, Jupyter settings, blank saved files, and windows that close at once.
Fix a Matplotlib figure that never appears: a missing plt.show(), the Agg backend, a headless server, Jupyter settings, blank saved files, and windows that close at once.
Change Matplotlib's default figure size, fonts, colors, spines, and grid with rcParams, apply settings temporarily, reset them, and save them to a style file.
Show image files and NumPy arrays with imshow, display grayscale correctly, control aspect ratio, origin, extent, and interpolation, and save the result.
Use sharex and sharey to give subplots the same limits, add one x label, y label, and legend for the whole figure, and control which tick labels show.
Make subplots of different sizes with subplot_mosaic and GridSpec, including spanning panels, width ratios, empty cells, polar panels, and nested grids.
What the Figure, Axes, and Axis objects are, how pyplot differs from the object-oriented interface, and how to translate between them.
A map of the Streamlit tutorials: build a first app, draw charts, cache slow work, keep values with session state, lay out and assemble a dashboard, and put it online.
The same small app in five Python frameworks, with code, screenshots, how each one reacts to input, and which to pick.
Put a Streamlit app online. Deploy free on Streamlit Community Cloud from GitHub, or use Render or Docker when you need more control.
Build a Streamlit dashboard with KPI cards and sparklines, period-over-period deltas, a date range filter, charts, and a formatted table.
Streamlit reruns your script on every interaction, so ordinary variables reset. st.session_state keeps values between reruns. Here is how to initialize it, update it with callbacks, and avoid the common errors.
Use st.cache_data for data you compute or load and st.cache_resource for shared objects like database connections and models. Here is how both behave, with ttl, max_entries and cache clearing.
Turn a Python script into a web app with Streamlit: install it, add a title, widgets, metrics and charts, and run it with streamlit run.
An interactive A/B test calculator in one Python file: sample size and run time before a test, then the p-value, confidence interval and split check after it.
Build a chat app with st.chat_input and st.chat_message, keep the history in session state, then stream replies from Claude with st.write_stream.
Make a bump chart in Matplotlib to show how rankings change over time, with smooth curves, highlighting, and top-N entries and exits.
Split a Streamlit app into pages with st.navigation and st.Page, from functions or separate files, with sections, shared filters, page links and role-based menus.
Let people upload a CSV with st.file_uploader, read it with pandas, pick columns and see a chart. Covers bad files, Excel, multiple files, size limits and downloads.
Arrange a Streamlit app with a sidebar, columns, tabs, expanders and containers, including column widths, alignment, button rows and lazy tabs.
Draw treemaps in Matplotlib with squarify: labels and values, color by a second measure, and a nested treemap built from rectangles.