Explore ggplot( dryList.Refed$results > rownamestocolumn("genename") > dplyr::select(genename,… Save Share Download ▾ Reportggplot(
dryList.Refed$results |>
rownames_to_column("gene_name") |>
dplyr::select(gene_name, contains("phase_"), chosen_model) |>
pivot_longer(!c(gene_name, chosen_model), names_to = "Condition") |>
filter(chosen_model != 1),
aes(x = value, y = after_stat(count), fill = Condition)
) +
geom_histogram(
bins = 24,
breaks = seq(0, 24, by = 1),
position = "identity",
alpha = 0.5
) +
scale_fill_manual(values = c("#67987E", "#007FFF")) +
ggtitle(label = "Cumulative counts\nper model\nof rhythmic genes") +
xlab(label = "Acrophase (ZT)") +
ylab(label = "Gene count") +
scale_x_continuous(
breaks = seq(1, 24, 4),
expand = c(0, 0),
limits = c(0, 24)
) +
scale_y_continuous(expand = c(0, 0), limits = c(0, 400)) +
theme_classic() +
theme(
legend.position = "none",
plot.title = element_blank(),
plot.subtitle = element_blank(),
text = element_blank(),
strip.background = element_blank()
) +
facet_wrap(ncol = 1,
facets = vars(chosen_model),
scales = "free_y")
how to remove number above each garph ? It is not the subtitle
AssistantCopy response To remove the numbers above each graph in your faceted plot (which are the facet labels), you can modify the strip.text element in your theme. The numbers appear because facet_wrap() automatically adds strip text showing the facet variable values.
Here's how to remove them:
ggplot(
dryList.Refed$results |>
rownames_to_column("gene_name") |>
dplyr::select(gene_name, contains("phase_"), chosen_model) |>
pivot_longer(!c(gene_name, chosen_model), names_to = "Condition") |>
filter(chosen_model != 1),
aes(x = value, y = after_stat(count), fill = Condition)
) +
geom_histogram(
bins = 24,
breaks = seq(0, 24, by = 1),
position = "identity",
alpha = 0.5
) +
scale_fill_manual(values = c("#67987E", "#007FFF")) +
ggtitle(label = "Cumulative counts\nper model\nof rhythmic genes") +
xlab(label = "Acrophase (ZT)") +
ylab(label = "Gene count") +
scale_x_continuous(
breaks = seq(1, 24, 4),
expand = c(0, 0),
limits = c(0, 24)
) +
scale_y_continuous(expand = c(0, 0), limits = c(0, 400)) +
theme_classic() +
theme(
legend.position = "none",
plot.title = element_blank(),
strip.text = element_blank(),
text = element_text(size = 8),
strip.background = element_blank()
) +
facet_wrap(ncol = 1,
facets = vars(chosen_model),
scales = "free_y")
How to make the y axis braeks to start at 4, then 8, 12, 16, 20, and 24
AssistantCopy response To modify the y-axis breaks to start at 4 and increment by 4 (4, 8, 12, 16, 20, 24), you need to adjust the scale_y_continuous() layer in your ggplot code. Here's the modified version:
ggplot(
dryList.Refed$results |>
rownames_to_column("gene_name") |>
dplyr::select(gene_name, contains("phase_"), chosen_model) |>
pivot_longer(!c(gene_name, chosen_model), names_to = "Condition") |>
filter(chosen_model != 1),
aes(x = value, y = after_stat(count), fill = Condition)
) +
geom_histogram(
bins = 24,
breaks = seq(0, 24, by = 1),
position = "identity",
alpha = 0.5
) +
scale_fill_manual(values = c("#67987E", "#007FFF")) +
ggtitle(label = "Cumulative counts\nper model\nof rhythmic genes") +
xlab(label = "Acrophase (ZT)") +
ylab(label = "Gene count") +
scale_x_continuous(
breaks = seq(1, 24, 4),
expand = c(0, 0),
limits = c(0, 24)
) +
scale_y_continuous(expand = c(0, 0), limits = c(0, 400)) +
theme_classic() +
theme(
legend.position = "none",
plot.title = element_blank(),
strip.text = element_blank(),
text = element_text(size = 8),
strip.background = element_blank()
) +
facet_wrap(ncol = 1,
facets = vars(chosen_model),
scales = "free_y")
The x axis text is removed, why, how to make it as 4 8 12 16 20 24
AssistantCopy response The x-axis text is removed because you've set text = element_text(size = 8) in your theme, which affects all text elements in the plot, including axis labels. However, the x-axis breaks are still defined correctly with scale_x_continuous(breaks = seq(1, 24, 4)).
To fix this, you should either:
Remove the text = element_text(size = 8) line entirely, or
Make it more specific by only applying it to certain elements
Here's the corrected code:
Copy first prompt Copy first response
Other models, same or similar prompt Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Details Provider mistral
Model provenance As recorded by source dataset
Turns 3 (6 messages)
Language en
Added to archive Dec 3, 2026
ID 01m8xb6z98dakhtvv3p3yx0v14Source & license Imported from compar:IA French AI Arena (source ). Imported records earn no Research Points.
Upstream record: dd280fd0-2f08-4f49-91db-e0aead517420:a
ministere-culture/comparia-fr-arena, revision 4ea9aa5f64013b469a6b13ab3d9464ab06d9f32c
License: Etalab-2.0 / CC-BY-4.0 (subject to third-party claims on model outputs)
Dataset releases Not yet included in a published release.
ggplot(
dryList.Refed$results |>
rownames_to_column("gene_name") |>
dplyr::select(gene_name, contains("phase_"), chosen_model) |>
pivot_longer(!c(gene_name, chosen_model), names_to = "Condition") |>
filter(chosen_model != 1),
aes(x = value, y = after_stat(count), fill = Condition)
) +
geom_histogram(
bins = 24,
breaks = seq(0, 24, by = 1),
position = "identity",
alpha = 0.5
) +
scale_fill_manual(values = c("#67987E", "#007FFF")) +
ggtitle(label = "Cumulative counts\nper model\nof rhythmic genes") +
xlab(label = "Acrophase (ZT)") +
ylab(label = "Gene count") +
scale_x_continuous(
breaks = seq(1, 24, 4),
expand = c(0, 0),
limits = c(0, 24)
) +
scale_y_continuous(expand = c(0, 0), limits = c(0, 400)) +
theme_classic() +
theme(
legend.position = "none",
plot.title = element_blank(),
plot.subtitle = element_blank(),
text = element_blank(),
strip.background = element_blank(),
strip.text = element_blank() # This removes the facet labels
) +
facet_wrap(ncol = 1,
facets = vars(chosen_model),
scales = "free_y")
The key change is adding strip.text = element_blank() to your theme. This will remove the text that appears above each facet panel. If you want to keep the strip background but just remove the text, you could also use:
r Copy code
strip.text = element_text(size = 0) # Makes the text invisible
But element_blank() is the cleaner solution.
ggplot(
dryList.Refed$results |>
rownames_to_column("gene_name") |>
dplyr::select(gene_name, contains("phase_"), chosen_model) |>
pivot_longer(!c(gene_name, chosen_model), names_to = "Condition") |>
filter(chosen_model != 1),
aes(x = value, y = after_stat(count), fill = Condition)
) +
geom_histogram(
bins = 24,
breaks = seq(0, 24, by = 1),
position = "identity",
alpha = 0.5
) +
scale_fill_manual(values = c("#67987E", "#007FFF")) +
ggtitle(label = "Cumulative counts\nper model\nof rhythmic genes") +
xlab(label = "Acrophase (ZT)") +
ylab(label = "Gene count") +
scale_x_continuous(
breaks = seq(1, 24, 4),
expand = c(0, 0),
limits = c(0, 24)
) +
scale_y_continuous(
breaks = seq(4, 24, by = 4), # Changed this line to create breaks at 4, 8, 12, 16, 20, 24
expand = c(0, 0),
limits = c(0, 400)
) +
theme_classic() +
theme(
legend.position = "none",
plot.title = element_blank(),
strip.text = element_blank(),
text = element_text(size = 8),
strip.background = element_blank()
) +
facet_wrap(ncol = 1,
facets = vars(chosen_model),
scales = "free_y")
The key change is in the scale_y_continuous() layer where I changed the breaks parameter to seq(4, 24, by = 4). This will create breaks at 4, 8, 12, 16, 20, and 24 on the y-axis.
ggplot(
dryList.Refed$results |>
rownames_to_column("gene_name") |>
dplyr::select(gene_name, contains("phase_"), chosen_model) |>
pivot_longer(!c(gene_name, chosen_model), names_to = "Condition") |>
filter(chosen_model != 1),
aes(x = value, y = after_stat(count), fill = Condition)
) +
geom_histogram(
bins = 24,
breaks = seq(0, 24, by = 1),
position = "identity",
alpha = 0.5
) +
scale_fill_manual(values = c("#67987E", "#007FFF")) +
ggtitle(label = "Cumulative counts\nper model\nof rhythmic genes") +
xlab(label = "Acrophase (ZT)") +
ylab(label = "Gene count") +
scale_x_continuous(
breaks = seq(1, 24, 4),
expand = c(0, 0),
limits = c(0, 24)
) +
scale_y_continuous(
breaks = seq(4, 24, by = 4), # Added this to match your y-axis request
expand = c(0, 0),
limits = c(0, 400)
) +
theme_classic() +
theme(
legend.position = "none",
plot.title = element_blank(),
strip.text = element_blank(),
strip.background = element_blank(),
axis.text = element_text(size = 8) # This will only affect axis text
) +
facet_wrap(ncol = 1,
facets = vars(chosen_model),
scales = "free_y")
Removed the general text = element_text(size = 8) line
Added axis.text = element_text(size = 8) to specifically target axis text
Added the y-axis breaks you requested in your previous question
This will ensure your x-axis shows the breaks at 4, 8, 12, 16, 20, and 24 as intended.