(A) Standard deviation of the activity change (i.e. Δ transients/min = (number of transients within 5 min after injection – number of transients within 5 min before injection)/5 min), for all animals across days. N = 6/5/7/7. S = saline, C = cocaine. (B) Analysis of the cocaine response with a linear mixed model, taking into account all cells and individual animals. Box plots (minimum, maximum, median, 25th and 75th percentile) represent the ratios of activity (number of transients within 5 min after injection +10) / (number of transients within 5 min before injection +10) for all neurons, with a log2 transformation to approach normality. Linear mixed model of the log2(ratio of activity) as a function of time or cell type, and individuals as random effect. Post-hoc Tukey test: D1R cocaine day 0 vs day 1, p < 10–4, day 0 vs day 8, p = 3 × 10–4, day 1 vs day 8, p < 10–4; D2 R cocaine day 0 vs day 1, p < 10–4, day 0 vs day 8 p < 10–4, day 1 vs day 8 p = 6 × 10–4; D1R cocaine vs D2R cocaine day 8, p = 3.7 × 10–2. All saline intra-group comparison p > 0.05. D1R saline (N = 6 animals, n = 19–66 neurons per animal per day, ntotal(days 0/1/8) = 273/235/229), D2R saline (N = 5 animals, n = 24–76 neurons per animal per day, ntotal(days 0/1/8) = 231/256/231), D1R cocaine (N = 7 animals, n = 50–134 neurons per animal per day, ntotal(days 0/1/8) = 525/507/580), D2R cocaine (N = 7 animals, n = 51–147 neurons per animal per day, ntotal(days 0/1/8) = 563/532/596). * = p < 0.05, ** = p < 0.01, S = saline, C = cocaine.