Plotting a 1-D function

Asked by Charles

Hello,

After updating VTK and VirtualBox's guest additions (OpenGL), I am able to plot again without segfaults. However, plotting a 1-d function (interval) is now plotted as a colored 3-D surface (well, a 3-d line).

How can I plot this as a x-y plot? Previously it would plot as a red line with legends?

This can be reproduced with the undocumented/Poisson1D demo in cpp or python. I am using revision 7082.

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Johannes Ring
Solved:
Last query:
Last reply:
Revision history for this message
Garth Wells (garth-wells) said :
#1

On Wed, Nov 7, 2012 at 7:56 PM, Charles
<email address hidden> wrote:
> New question #213618 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/213618
>
> Hello,
>
> After updating VTK and VirtualBox's guest additions (OpenGL), I am able to plot again without segfaults. However, plotting a 1-d function (interval) is now plotted as a colored 3-D surface (well, a 3-d line).
>

Is it a 32-bit VM?

Plotting works fine for me (64-bit), but I suspected that recent
change might trip up on 32 bit machines (related to handling
std::size_t in the SWIG layer).

Garth

> How can I plot this as a x-y plot? Previously it would plot as a red line with legends?
>
> This can be reproduced with the undocumented/Poisson1D demo in cpp or python. I am using revision 7082.
>
> Thank you
>
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Revision history for this message
Charles (rodbourn) said :
#2

Hello Garth,

Does it plot an xy graph for you? When I run the demos a 3D plot with perspective is shown.

I am running Ubuntu 12.04 LTS x64.

Thank you

Revision history for this message
Charles (rodbourn) said :
#3

To follow up on SWIG, I don't think that's the issue since I see it in c++ demos in the same way as I do in python demos.

Revision history for this message
Charles (rodbourn) said :
#4

I think I have a resolution. Previously it appears the plotter was calling Viper, see

http://bazaar.launchpad.net/~dolfin-core/dolfin/trunk/view/5926/dolfin/plot/plot.cpp

Which had the 1-D plotting feature (mode = "plot_xy")

I couldn't find this functionality in the current c++ implementation.

Revision history for this message
Garth Wells (garth-wells) said :
#5

On Wed, Nov 7, 2012 at 10:01 PM, Charles
<email address hidden> wrote:
> Question #213618 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/213618
>
> Charles posted a new comment:
> I think I have a resolution. Previously it appears the plotter was
> calling Viper, see
>
> http://bazaar.launchpad.net/~dolfin-
> core/dolfin/trunk/view/5926/dolfin/plot/plot.cpp
>
> Which had the 1-D plotting feature (mode = "plot_xy")
>
> I couldn't find this functionality in the current c++ implementation.
>

It luckily unrelated to some recent changes that I made . . .

I don't know if 1D plots are properly supported yet with the new
plotting backend. It's not clear from

    https://blueprints.launchpad.net/dolfin/+spec/dolfin-plot-c++

Someone who's up-to-date with where the plotting backend is at will be
able to comment.

Garth

> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Revision history for this message
Best Johannes Ring (johannr) said :
#6

Plotting of 1D functions has been improved in Joachim's plot branch (lp:~jobh/dolfin/plot). Hopefully, it will be merged into trunk in the not-so-distant future.

Revision history for this message
Charles (rodbourn) said :
#7

Excellent, can't wait :)

Revision history for this message
Charles (rodbourn) said :
#8

Thanks Johannes Ring, that solved my question.

Revision history for this message
Charles (rodbourn) said :
#9

The 1-D plotting that has been merged in is really nice! Thank you