Skip to content

Commit

Permalink
small adjustments to the margins
Browse files Browse the repository at this point in the history
  • Loading branch information
tlnagy committed Dec 30, 2023
1 parent d9dcd66 commit 71eea88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions figures/Notebooks/coulter.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# title: Neutrophil Volume Response in Suspension
# cover: assets/coulter_response_kos.svg
# description: ""
# description: "To better compare to previous literature, we also measured volume response in suspension"
# ---

# All data was collected on a Beckman-Coulter Z2 Coulter Counter
Expand All @@ -15,6 +15,7 @@ using DataStructures
using Dates
using Measures
using Plots
using Plots: px
using StatsBase
using StatsPlots
using Measurements
Expand Down Expand Up @@ -129,10 +130,10 @@ p = @df combo plot(:roundtime, Measurements.value.(:median_m_mean),
Measurements.value.(:median_u_mean .- :median_m_mean)), group = :Sample,
leg = false, linewidth = 2, ylabel = "Median volume (fL)", xlabel = "Time",
c = [5 2 4 1],
m = 3, topmargin = -3mm,
m = 3, topmargin = -3mm, margin = 25px,
framestyle = :axes, xticks = [-3, 0, 5, 10],
title = "Neutrophil Volume Response\nin Suspension",
xlim = (-3.5u"minute", 12.5u"minute"), ylim = (310, 400), size = (480, 400))
xlim = (-3.5u"minute", 12.5u"minute"), ylim = (310, 400), size = (530, 450))

plot!([0, 0],[380,360],arrow=true,color=:black,linewidth=3,label="", rightmargin = 15mm)
annotate!(2, 385, text("+fMLP", :black, :right, 10))
Expand Down Expand Up @@ -181,12 +182,12 @@ p = normplot(filter(x->x.Sample in ["DMSO", "iNHE1", "Duvelisib"], combo), [2 4

annotate!(13, 1.00, text("iNHE1", okabe_ito[2], :left, :bold, 11))
annotate!(13, 1.10, text("DMSO", okabe_ito[1], :left, :bold, 11))
annotate!(13, 1.05, text("iPI3Kγ", okabe_ito[4], :left, :bold, 11))
annotate!(13, 1.05, text("iPI3Kγ", okabe_ito[4], :left, :bold, 11), margin = 25px, size = (540, 450))
p

# ## Plot normalized volume for Latrunculin condition

p2 = normplot(filter(x->x.Sample in ["DMSO", "LatB"], combo), [5 1])
annotate!(13, 1.095, text("DMSO", okabe_ito[1], :left, :bold, 11))
annotate!(13, 1.12, text("LatB", okabe_ito[5], :left, :bold, 11))
annotate!(13, 1.12, text("LatB", okabe_ito[5], :left, :bold, 11), margin = 25px, size = (540, 450))
p2
5 changes: 3 additions & 2 deletions figures/Notebooks/motility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using ImageFiltering
using Measures
using Measurements
using Plots
using Plots: px
using Statistics
using StatsPlots
using Unitful
Expand Down Expand Up @@ -109,8 +110,8 @@ function velocity_plot(df)
framestyle = :axes, grid = :y, xlim = (-10, 30), ylim = (0, 10.5),
tick_direction = :out, #leg = :outerright,
topmargin = 5mm, rightmargin = 15mm,
linewidth = 2, c = getindex.(Ref(cmap), :condition), leg = false,
size = (480, 350))
linewidth = 2, c = getindex.(Ref(cmap), :condition), leg = false, margin = 25px,
size = (530, 400))
vspan!([0, 0.5], label = "", alpha = 0.5, c = colorant"purple")
annotate!(-0.3, 9, text("fMLP\nuncage", :black, :right, 8))
("WT" in df.condition) && annotate!(30.5, 7.5, text("Ctrl", "Helvetica Bold", okabe_ito[1], :left, 10))
Expand Down
2 changes: 1 addition & 1 deletion figures/Notebooks/singlecell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ annotate!(10.5, 1.30, text("Ctrl", "Helvetica Bold", okabe_ito[1], :left, 10))
annotate!(10.5, 0.95, text("iNHE1", "Helvetica Bold", okabe_ito[2], :left, 10))
annotate!(10.5, 1.19, text("LatB", "Helvetica Bold", okabe_ito[5], :left, 10))

p1 = plot(p, grid = :y, size = (450, 350))
p1 = plot(p, grid = :y, margin = 25px, size = (500, 400))

savefig(p1, joinpath("assets", "single_cell.svg"))
p1
Expand Down

0 comments on commit 71eea88

Please sign in to comment.