Software recommendation: find DNA sequence distribution over entire transcript
If I understand the question correctly, you'd like to plot the positions of the matches to you motif along with a gene model that shows the positions of introns and exons for the different transcripts. This can be accomplished fairly easily with ggbio:
library(EnsDb.Mmusculus.v79)
library(ggbio)
library(biomaRt)
library(stringr)
library(dplyr)

# plot gene model with ggbio
gene_model &lt;- autoplot(EnsDb.Mmusculus.v79, ~ symbol == &quot;Grin1&quot;)

ensembl &lt;- useMart(&quot;ensembl&quot;, dataset = &quot;mmusculus_gene_ensembl&quot;)

# You need the full length gene sequence to match the gene model
seq &lt;- biomaRt::getSequence(id = &quot;Grin1&quot;,
                         type = &quot;mgi_symbol&quot;,
                         seqType = &quot;gene_exon_intron&quot;,
                         mart = ensembl)

# retrieve position of gene in genome to match up with gene model
gene_start=biomaRt::getBM(attributes=c(&quot;start_position&quot;), filters = 'external_gene_name', values = 'Grin1', mart=ensembl)

# use stringR to find positions of exact matches
motif &lt;- &quot;ggcc&quot;
motif_positions &lt;- as.data.frame(str_locate_all(seq$gene_exon_intron, toupper(motif))) %&gt;%
  mutate(start=start+gene_start[[1]]-1)

# make plot similar to Llopis's answer 
motif_plot &lt;- ggplot(motif_positions, aes(x=start)) +
    geom_point(y=1) +
    scale_y_continuous(limits=c(0,1))

# combine plots
tracks(motif= motifs, gene_model=gene_model)


This gives all motif matches for the gene sequence, not just the transcripts. It would be quite straightforward to filter out positions that overlap introns