Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnuplot1d gives error on plot of facevariable #206

Closed
fipymigrate opened this issue Sep 19, 2014 · 5 comments
Closed

gnuplot1d gives error on plot of facevariable #206

fipymigrate opened this issue Sep 19, 2014 · 5 comments
Milestone

Comments

@fipymigrate
Copy link

When plotting a facevariable, one obtains the error:

Traceback (most recent call last):
File "stratifiedmassflow.py", line 134, in
viewervel.plot()
File "/usr/lib/python2.6/dist-packages/FiPy-2.1-py2.6.egg/fipy/viewers/gnuplotViewer/gnuplotViewer.py", line 99, in plot
self._plot()
File "/usr/lib/python2.6/dist-packages/FiPy-2.1-py2.6.egg/fipy/viewers/gnuplotViewer/gnuplot1DViewer.py", line 83, in plot
with
='lines'),)
File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 560, in Data
data = utils.float_array(data)
File "/usr/lib/python2.6/dist-packages/Gnuplot/utils.py", line 33, in float_array
return numpy.asarray(m, numpy.float32)
File "/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line 230, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.

Imported from trac ticket #302, created by benny.malengier@gmail.com on 07-14-2010 at 12:15, last modified: 05-09-2011 at 16:53

@fipymigrate fipymigrate added this to the 3.0 milestone Sep 19, 2014
@fipymigrate
Copy link
Author

benny.malengier@gmail.com attached faceplot.patch on 07-14-2010 at 12:15

@fipymigrate
Copy link
Author

benny.malengier@gmail.com attached faceplot_improved.patch on 07-15-2010 at 07:34

@fipymigrate
Copy link
Author

In the patch in attachment, the exception determines the use of cell or face centers. Probably there is a way in fipy to query what type of variable it is, if so, fix can be better ...

Trac comment by benny.malengier@gmail.com on 07-14-2010 at 12:16

@fipymigrate
Copy link
Author

I now encountered the same problem with 2D gnuplot viewing.
New patch faceplot_improved.patch uses the class to determine what to do, and works for 1D and 2D Facevariable plots.

Trac comment by anonymous on 07-15-2010 at 07:36

@wd15
Copy link
Contributor

wd15 commented Sep 19, 2014

Fixed with r4537.

Trac comment by wd15 on 05-09-2011 at 16:53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants