# How to plot a density from a .mrc file?

**URL:** https://discourse.paraview.org/t/how-to-plot-a-density-from-a-mrc-file/3086
**Category:** ParaView Support
**Created:** [December 1, 2019, 12:59am UTC](https://discourse.paraview.org/t/how-to-plot-a-density-from-a-mrc-file/3086 "2019-12-01T00:59:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![szsdk](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@szsdk](https://discourse.paraview.org/u/szsdk)
#### Post date: [December 1, 2019, 12:59am UTC](https://discourse.paraview.org/t/how-to-plot-a-density-from-a-mrc-file/3086/1 "2019-12-01T00:59:33Z")

</div>

I want to plot a 3d array stored in a mrc file. But after open it, nothing is plotted. I also tried to add contour to it, but still failed. I think this function should be pretty basic. I must miss some critical steps.

[te.mrc](https://discourse.paraview.org/uploads/short-url/nCZTJfWXSbhDjnrB9VuuCoEsEG6.mrc) (32.3 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 2, 2019, 9:13am UTC](https://discourse.paraview.org/t/how-to-plot-a-density-from-a-mrc-file/3086/2 "2019-12-02T09:13:31Z")

</div>

You .mrc file seems to be ill-formatted.

Here is a correctly formatted one.  
[https://data.kitware.com/api/v1/item/5afd93a28d777f15ebe1b814/download](https://data.kitware.com/api/v1/item/5afd93a28d777f15ebe1b814/download)

---

<div class="post-metadata">

### Author: ![szsdk](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@szsdk](https://discourse.paraview.org/u/szsdk)
#### Post date: [December 3, 2019, 2:42pm UTC](https://discourse.paraview.org/t/how-to-plot-a-density-from-a-mrc-file/3086/3 "2019-12-03T14:42:17Z")

</div>

I used the python package `mrcfile` to convert a numpy array to a mrc file. And `chimeara` can plot it correctly. Maybe there is some inconsistency among those libraries or software and paraview.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 3, 2019, 3:02pm UTC](https://discourse.paraview.org/t/how-to-plot-a-density-from-a-mrc-file/3086/4 "2019-12-03T15:02:40Z")

</div>

Definitely possible, but hard to pinpoint.
