# Python Trace Color Bar Size

**URL:** https://discourse.paraview.org/t/python-trace-color-bar-size/2217
**Category:** ParaView Support
**Created:** [July 14, 2019, 4:02pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217 "2019-07-14T16:02:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JaredCrean2](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@JaredCrean2](https://discourse.paraview.org/u/JaredCrean2)
#### Post date: [July 14, 2019, 4:02pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/1 "2019-07-14T16:02:29Z")

</div>

I am using the python trace functionality to generate plots, but am having trouble with the size of the color bar. Executing the python script creates an image with the color bar much larger than on the original image saved while creating the trace. I have attached a minimal reproducible example.

Here is the plot generated while recording the trace (`density_le_orig.png`):

 ![density_le_orig](https://discourse.paraview.org/uploads/default/original/2X/2/238b5f04da8bd3d5bd2a37367bf4b0196444e479.png)

And here is the one generated by running the resulting python script (`density_le.png`):

 ![density_le](https://discourse.paraview.org/uploads/default/original/2X/7/7928f353a1e4661bc39054dd70640fe6ff2a366d.png)

The problem is somewhat similar to [this](https://discourse.paraview.org/t/trace-clip-color-bar-scale-range/1728), except the problem is not the color bar range, it is the size.

[files.tar.gz](https://discourse.paraview.org/uploads/default/original/2X/0/0fb0590c80ecdeb472d3bacf9a036515b932ba6c.gz) (916.5 KB)

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 14, 2019, 9:38pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/2 "2019-07-14T21:38:41Z")

</div>

This is a known issue. It should be fixed in the upcoming release. Try the 5.7.0 release candidate. Let us know if you see any issues.

Alan

---

<div class="post-metadata">

### Author: ![JaredCrean2](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@JaredCrean2](https://discourse.paraview.org/u/JaredCrean2)
#### Post date: [July 14, 2019, 10:39pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/3 "2019-07-14T22:39:24Z")

</div>

No luck with 5.7.0-RC1-MPI-Linux64bit:

 ![density_le](https://discourse.paraview.org/uploads/default/original/2X/f/f70a1bf6a08be97b41f96f80cb4c9a7db2ea1018.png)

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [July 16, 2019, 4:23am UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/4 "2019-07-16T04:23:57Z")

</div>

@wascott This likely won’t make the 5.7 release, I’m afraid.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 16, 2019, 5:26pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/5 "2019-07-16T17:26:49Z")

</div>

So, the issue is [https://gitlab.kitware.com/paraview/paraview/issues/18651](https://gitlab.kitware.com/paraview/paraview/issues/18651)? And, you are correct. I thought I remembered @utkarsh.ayachit fixing it. Bad memory.

As stated in the bug report above, this is scheduled to be fixed in 5.8.0. This should occur early next year.

---

<div class="post-metadata">

### Author: ![JaredCrean2](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@JaredCrean2](https://discourse.paraview.org/u/JaredCrean2)
#### Post date: [July 20, 2019, 2:52pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/6 "2019-07-20T14:52:49Z")

</div>

I was able to find a workaround. In the python file, I found this line:

```auto
# uncomment following to set a specific view size                               
# renderView1.ViewSize = [1198, 753]

```

It appears this sets the render view size to the same as it was when I had the Paraview window open, so the color bar is the same size.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [July 23, 2019, 5:35pm UTC](https://discourse.paraview.org/t/python-trace-color-bar-size/2217/7 "2019-07-23T17:35:35Z")

</div>

Good. Note that the commented out header, created with the trace recorder, reminds everyone to uncomment out this line.
