# Wrong Plots from A Box

**URL:** <https://openmc.discourse.group/t/wrong-plots-from-a-box/2434>\
**Category:** User Support\
**Created:** [November 4, 2022, 9:03am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434 "2022-11-04T09:03:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seamoon](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Seamoon](https://openmc.discourse.group/u/Seamoon)\
**Post date:** [November 4, 2022, 9:03am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/1 "2022-11-04T09:03:30Z")

</div>

Hi,everyone!  
There is something wrong when I use the OpenMC plot.  
1)  
The geometry I wan to create is A BOX.The code to define it is post underneath.

 ![geometry](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/0/0efbf97511e63e613c182baf49e8a673f7e42c95.png)

1. 

The plot what I want is divided to 3 parts: plane x-y,x-z,y-z.The code to define it is post underneath,too.

 ![plot](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/9/93fbd728192248b557a551e908c5274321d0f656.png)

1. 

But when I use the OpenMC plot, the outcome pictures is clearly wrong.

 ![plot_2](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/f/f580b1ca63cfeebbad89ba1cec5b56d1bedd9d43.png)  
 ![plot_3](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/3/3849cc7d0488184a027e9b59bfa49a272940f4cc.png)  
 ![plot_1](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/7/7cbadbb4a1dd0c3de9ac7f752020cb35eee5af8f.png)

The picture"plot\_1"is totally full of white!  
It means that nothing stand in plane x-y from the view of z axis.

But the other 2 pictures remind me that there must be somethting when you look from z axis.

1. 

As you can see, What I am trying to do is use the plot of voxel. But I want to share this problem to all of you, in case of someone else gets stuck in it.

Kind Regards,  
Seamoon

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [November 4, 2022, 10:01pm UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/2 "2022-11-04T22:01:28Z")

</div>

@Seamoon If you haven’t already, I would strongly recommend taking a look at our [`openmc-plotter`](https://github.com/openmc-dev/plotter/) application which gives you a nice GUI to explore your model without having to generate `Plot` objects manually.

---

<div class="post-metadata">

**Author:** ![Seamoon](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Seamoon](https://openmc.discourse.group/u/Seamoon)\
**Post date:** [November 5, 2022, 1:59am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/3 "2022-11-05T01:59:03Z")

</div>

Paul, thanks for your reply! But I’m using OpenMC in WSL Ubuntu, which has no GUI. What I would like to know is the correct steps to install&use openmc-plotter.

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [November 5, 2022, 3:52am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/4 "2022-11-05T03:52:17Z")

</div>

Installing the plotter is easy: either `pip install openmc-plotter` or `conda install openmc-plotter`. However, running a GUI application through WSL Ubuntu may run into problems. On recent versions of Windows 11 though, [running GUI apps](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) should be possible.

---

<div class="post-metadata">

**Author:** ![Seamoon](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Seamoon](https://openmc.discourse.group/u/Seamoon)\
**Post date:** [November 5, 2022, 8:05am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/5 "2022-11-05T08:05:54Z")

</div>

@paulromano Thanks for your reply! After hours of installing softwares into WSL and Windows, I finally successfully install all the support softwares of OpenMC Plot Explorer & itself.  
With the help of OpenMC Plot Explorer, I can clearly see the BOX, but I cann’t find out the reason why my code “plot1” outcomes a full white background up to now.

By the way, the reason why I can survive from the terrible experience of softwares installation is the beauty of Eagles’s song \<Love Will Keep Us Alive,🙂

---

<div class="post-metadata">

**Author:** ![Seamoon](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Seamoon](https://openmc.discourse.group/u/Seamoon)\
**Post date:** [November 5, 2022, 8:10am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/6 "2022-11-05T08:10:11Z")

</div>

Jesus,When I use the \<\>, I can’t write down my favorite song name into it 😞

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://openmc.discourse.group/u/abc)\
**Post date:** [February 9, 2023, 6:38am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/7 "2023-02-09T06:38:32Z")

</div>

Would you like to teach me how to install and use openmc-plotter?Because i am also using the WSL Ubuntu,and I’m struggling with it now

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://openmc.discourse.group/u/abc)\
**Post date:** [February 9, 2023, 6:41am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/8 "2023-02-09T06:41:45Z")

</div>

and there is my problem

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/6/6516207e8ef8e469afa9eac0f95ae3666839e4d4.jpeg)

---

<div class="post-metadata">

**Author:** ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)\
**Post date:** [February 9, 2023, 8:15am UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/9 "2023-02-09T08:15:45Z")

</div>

In general graphics apps don’t work on WSL

However there is now a new version of WSL that supports graphics apps. I’ve not tried it but perhaps it is worth a go

> **[Run Linux GUI apps with WSL](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps)**
>
> Learn how WSL support running Linux GUI apps.

Alternatively there are some openmc plotting apps I’m experimenting with that work on the web, so nothing to install. [https://www.xsplot.com/](https://www.xsplot.com/)

---

<div class="post-metadata">

**Author:** ![ebknudsen](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@ebknudsen](https://openmc.discourse.group/u/ebknudsen)\
**Post date:** [February 9, 2023, 3:18pm UTC](https://openmc.discourse.group/t/wrong-plots-from-a-box/2434/10 "2023-02-09T15:18:54Z")

</div>

Before WSL2 you need an X-server running in windows which you can connect. I’ve had some good mileage from Xming.  
Once started you’d have to set the DISPLAY environment variable in your shell to point to the server, so clients can connect to it. Like so:  
`export DISPLAY=localhost:0.0`  
This has worked well for me in the past.

cheers  
Erik
