PheWAS figure cutoff - need to use GraphQL?

I’m working on a manuscript for publication, and we intend to include a PheWAS plot for a SNP in the paper (found at this link). However, the names of several traits are cut-off at the bottom of the figure. Is there a way to export the image without those traits cut-off? I’m unfamiliar with GraphQL, but I wonder if I need to use it to generate this plot without the labels cut-off. Is that the most efficient way to solve this problem? Thank you!

Hi Jessica, There are two ways to do this.

  1. On the upper right corner of the PheWAS plot there’s a button called svg. This allows you to download the plot in svg (scalable vector graphics) format. This is a textual representation of the image, so it allows you to interact with the plot it its entirety. All you need to do is to increase the height and width dimensions of the canvas:
<svg xmlns="" height="640" width="2356.90625">

You can then open the updated svg in your browser and you’ll see that the increased cavas size has enough space for the text. You can then print screen, or use an export tool eg. gimp, inkscape, adobe illustrator to save the bitmap.

  1. You can also use graphql query to extract the raw data so you can make your own plot via Python, R or your plotting tool of choice.
query PheWASQuery {
  pheWAS(variantId: "12_56002984_G_C") {
    associations {
      study {

As you can see it in the GraphQL playground.

Please let us know if you have any question!

Hi Daniel,
Thank you so much for your response! That is incredibly helpful.

I also realized the names of the traits overlap in the plot making it unreadable. Would the solution for that be: extract raw data with graphql → copy to R studio → use gg plot to scatter the traits so none of them overlap in the plot? Or is there another program you recommend in R?

Thanks again!


If you have decided to extract data from GraphQL we have examples on how this could be done via R here. The data is however quite nested. You would need to organize it in a way that is suitable for ggplot, which I highly recommend for this task. (however, I have to admit, I’m no way expert in that library).

If you solved that, I would highly recommend sharing the code here on the community, other’s might be also interested.