# Plotting the electric field profile

**URL:** <https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154>\
**Category:** Garfield++\
**Created:** [August 26, 2020, 6:15am UTC](https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154 "2020-08-26T06:15:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satoko\_Asahi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/satoko_asahi/32/22156_2.png) [@Satoko\_Asahi](https://root-forum.cern.ch/u/Satoko_Asahi)\
**Post date:** [August 26, 2020, 6:15am UTC](https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154/1 "2020-08-26T06:15:04Z")

</div>

Hi All,

I created a cell with 1 wire (open circle) with a positive HV and 9 wires (black dots) without any HV applied as attached picture (see celllayout.pdf). They are 1 cm apart of each other. When I try to check the electric field profile using “plotprofile” of ViewField, the output graph of x-axis is “normalized distance.” Is there a way to set x-axis to be un-normalized distance? And how can I change the range of y-axis to plot?

Thank you for your help.

Kind Regards,  
Satoko [celllayout.pdf](https://root-forum.cern.ch/uploads/short-url/tcD8B2ylkGiDl45zaAlNBV9YGVC.pdf) (12.4 KB) [example.pdf](https://root-forum.cern.ch/uploads/short-url/UzoMBOgVSTJKiK2EKEZOev0Lqn.pdf) (20.2 KB)

---

<div class="post-metadata">

**Author:** ![StephanH](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@StephanH](https://root-forum.cern.ch/u/StephanH)\
**Post date:** [August 26, 2020, 9:02am UTC](https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154/2 "2020-08-26T09:02:51Z")

</div>

Hi,

I guess that’s a question for @hschindl.

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [August 26, 2020, 1:44pm UTC](https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154/3 "2020-08-26T13:44:36Z")

</div>

Hi,  
I’ve just committed a small modification,

> **[Add option to use non-normalised distance coordinates in a profile plot....](https://gitlab.cern.ch/garfield/garfieldpp/-/merge_requests/116)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

`ViewField::PlotProfile` now has an additional argument (`bool normalized`). If you set it to `false`, the x-axis will show the non-normalized distance from the starting point. Let me know if it works.

To change the y-axis limits you can use the functions  
`SetVoltageRange(const double vmin, const double vmax);`  
or  
`SetElectricFieldRange(const double emin, const double emax);`

Best regards,  
Heinrich

---

<div class="post-metadata">

**Author:** ![Satoko\_Asahi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/satoko_asahi/32/22156_2.png) [@Satoko\_Asahi](https://root-forum.cern.ch/u/Satoko_Asahi)\
**Post date:** [August 27, 2020, 2:37am UTC](https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154/4 "2020-08-27T02:37:05Z")

</div>

Hi Heinrich,

I merged the change, and it is working. Thank you so much.

Kind Regards,  
Satoko

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 10, 2020, 2:37am UTC](https://root-forum.cern.ch/t/plotting-the-electric-field-profile/41154/5 "2020-09-10T02:37:09Z")

</div>

Closed on September 10, 2020, 2:37am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
