text: user10083: Within the GWAS wikipedia page, you can view the following plot:
  
  
  "Illustration of a simulated genotype by phenotype regression for a
  single SNP. Each dot represents an individual. A GWAS of a continuous
  trait essentially consists of repeating this analysis at each SNP."
  
  This is a regression plot showing on the y-axis the phenotype value for a continuous trait. Is it possible to create a similar plot with a binary trait - I can't think what this would look like, or if there is an equivalent plot I could create.
  
  user6674: I have not really seen this type of plot used when a binary outcome is being analyzed. I think in part this is due to the fact that the plot will be rather boring and difficult to interpret as there are only a limited set of possible values (4 if the response and independent variable are both binary), and without introducing some level of random noise, all of the data observations with the same X-Y value pair would overlap.
  The situation is a little better when the independent variable is continuous: then you can show more of a distribution. In the figure below, pulled from Figure 2 of this paper explaining how to visualize the discrimination abilities of a logistic regression model, the authors have plotted the risk score produced by the logistic regression model for each patient (x-axis) with the patient's actual outcome on the y-axis. Note that some random noise has been introduced to each observation's y-value so that they do not cover up each other. This plot shows that the risk score is able to somewhat separate the two outcomes.
  
  If you are dealing with a categorical independent variable like the figure included in your question, I think it is better to visualize the proportion of the outcome for each independent variable category like this:
  
  Here the outcome is whether the borrower defaulted on their loan (1 = yes, 0 = no) and the independent variable is whether they are a student (yes/no). For the y-axis, I have calculated the proportion of loan recipients in each group that defaulted. This could easily be done with GWAS data such as genotype vs whether the patient died of heart disease.
  I also suggest you check out this answer on how to visualize a contingency table, as the data you are describing (assuming the independent variable stays categorical) is a contingency table.
  
original_text: 10083: <p>Within the <a href="https://en.wikipedia.org/wiki/Genome-wide_association_study" rel="nofollow noreferrer">GWAS wikipedia page</a>, you can view the following plot:</p>
  <p><a href="https://i.stack.imgur.com/7jbps.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7jbps.png" alt="gwas" /></a></p>
  <blockquote>
  <p>&quot;Illustration of a simulated genotype by phenotype regression for a
  single SNP. Each dot represents an individual. A GWAS of a continuous
  trait essentially consists of repeating this analysis at each SNP.&quot;</p>
  </blockquote>
  <p>This is a regression plot showing on the y-axis the phenotype value for a continuous trait. Is it possible to create a similar plot with a binary trait - I can't think what this would look like, or if there is an equivalent plot I could create.</p>
   6674: <p>I have not really seen this type of plot used when a binary outcome is being analyzed. I think in part this is due to the fact that the plot will be rather boring and difficult to interpret as there are only a limited set of possible values (4 if the response and independent variable are both binary), and without introducing some level of random noise, all of the data observations with the same X-Y value pair would overlap.</p>
  <p>The situation is a little better when the independent variable is continuous: then you can show more of a distribution. In the figure below, pulled from Figure 2 of <a href="https://pubmed.ncbi.nlm.nih.gov/20641144/" rel="nofollow noreferrer">this paper</a> explaining how to visualize the discrimination abilities of a logistic regression model, the authors have plotted the risk score produced by the logistic regression model for each patient (x-axis) with the patient's actual outcome on the y-axis. Note that some random noise has been introduced to each observation's y-value so that they do not cover up each other. This plot shows that the risk score is able to somewhat separate the two outcomes.</p>
  <p><a href="https://i.stack.imgur.com/3DGGC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3DGGC.png" alt="enter image description here" /></a></p>
  <p>If you are dealing with a categorical independent variable like the figure included in your question, I think it is better to visualize the proportion of the outcome for each independent variable category like this:</p>
  <p><a href="https://i.stack.imgur.com/HOfGP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HOfGP.png" alt="enter image description here" /></a></p>
  <p>Here the outcome is whether the borrower defaulted on their loan (1 = yes, 0 = no) and the independent variable is whether they are a student (yes/no). For the y-axis, I have calculated the proportion of loan recipients in each group that defaulted. This could easily be done with GWAS data such as genotype vs whether the patient died of heart disease.</p>
  <p>I also suggest you check out <a href="https://stats.stackexchange.com/questions/147721/which-is-the-best-visualization-for-contingency-tables">this answer</a> on how to visualize a contingency table, as the data you are describing (assuming the independent variable stays categorical) is a contingency table.</p>
  