WHY does this matter? Journals specify a column width in inches (e.g. 3.5 in) AND a minimum DPI (often 300 for line art, 600 for fine detail). If you only set pixel size you have no control over how big text looks on the page.
WHY raw strings? In a normal string "\lambda" → \l is not a known escape but "\n"is a newline. Using r"..." guarantees backslashes reach LaTeX untouched.
Imagine drawing a picture to put in a real book. DPI is how many tiny dots you cram in per inch — too few and the picture looks blocky like Minecraft. LaTeX labels make the words and math in your picture match the fancy fonts in the book so it doesn't look out of place. Colormaps are the rule for turning numbers into colors — a good rule paints big numbers brighter step by step, so your eye reads the picture honestly instead of getting tricked by a flashy rainbow.
Dekho, ek figure ko "publication-quality" banane ke liye sirf teen cheezein control karni hoti hain — main inhe D-L-C bolta hun: Dots (DPI), Letters (LaTeX labels), aur Colors (colormap). DPI matlab kitne pixels ek inch me bharein hain. Yaad rakho: figsize aapke figure ka asli physical size inches me set karta hai, aur dpi sirf sharpness. Agar tum sirf dpi=600 kar do par figsize default chhod do, toh column me figure shrink ho jaayega aur 9-point font 5-point jaisa dikhega — illegible. Isliye pehle figsize (journal ki column width, jaise 3.5 inch) set karo, phir dpi.
Letters ka matlab — agar tum text.usetex=True karte ho toh asli LaTeX se text render hota hai, jisse fonts bilkul tumhare paper ke jaise match karte hain. Math likhne ke liye $...$ use karo, aur string ke aage r lagao (r"$\lambda$") taaki Python backslash ko kharab na kare. Yeh raw string wali galti bahut common hai.
Colors sabse zyada log galti karte hain. jet (rainbow) bahut colourful lagta hai isliye accha lagta hai, par yeh dhokha deta hai — beech me bright yellow band fake edges bana deta hai aur grayscale ya colorblind logon ke liye useless ho jaata hai. Iski jagah viridis use karo — yeh perceptually uniform hai, matlab data ki value jaise badhti hai brightness bhi waise hi smoothly badhti hai. Agar data ka meaningful center hai (jaise +/- anomaly) toh coolwarm jaisa diverging colormap lo. Aur har colormap ke saath ek labeled colorbar zaroor lagao, warna color ka matlab kisi ko samajh nahi aayega. Last tip: line plots ko PDF me save karo (vector, infinite sharpness), aur dense heatmaps/photos ko PNG/TIFF me high DPI par.