Hi John, et al.
I'm sorry in advance if I'm missing the point. I think FiPy does a
nice job of giving the user tools to do visualizations. With respect
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Fkablondino%2F0cc44c3ea4e807b8e2088adbe40ef142&data=02%7C01%7Cjonathan.guyer%40nist.gov%7C3df2f9c1cf9b4f398cd808d58fe96a9c%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636573155048426975&sdata=2LrLtsiR59XcmMDu1zUvma4Yd261RGV6HZCJJ8JZrNE%3D&reserved=0
Thanks again for FiPy.
Post by Guyer, Jonathan E. Dr. (Fed)I must confess that this answer makes me sad. FiPy is object oriented
precisely so that you don't need to do this. The intended design is
that you subclass Matplotlib1DViewer to override the behavior you
* In Matplotlib1DViewer.__init__(), around https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fusnistg&data=02%7C01%7Cjonathan.guyer%40nist.gov%7C3df2f9c1cf9b4f398cd808d58fe96a9c%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636573155048426975&sdata=KPe4Bm%2BJ8iAwsSIRq%2BGsZPHZvU7F%2F51%2BaPA4t8Vff0Y%3D&reserved=0
ov/fipy/blob/71d82e1cc7b2c4e7c1c996d038fd8542d7e4c5a1/fipy/viewers/ma
tplotlibViewer/matplotlib1DViewer.py#L82 and following, add a
`color=` argument to the creation of the lines.
* In Matplotlib1DViewer._plot(), after https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fusnistgov%2Ff&data=02%7C01%7Cjonathan.guyer%40nist.gov%7C3df2f9c1cf9b4f398cd808d58fe96a9c%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636573155048426975&sdata=sKW13ir85JXFTmSaNkBDWHBN9I1Z%2FghRefxBuvHrlaE%3D&reserved=0
ipy/blob/71d82e1cc7b2c4e7c1c996d038fd8542d7e4c5a1/fipy/viewers/matplo
tlibViewer/matplotlib1DViewer.py#L145, add a `line[0].set_color()`
call.
In addition to subclassing for your own purposes, a pull request that
adds this capability to Matplotlib1DViewer would be most welcome.
P.S. I think Dan Lewis is thinking of the custom viewers in https://w
ww.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.anisot
ropy.html and https://www.ctcms.nist.gov/fipy/examples/phase/generate
d/examples.phase.polyxtal.html. Neither does the specific
customization you are looking for, but they illustrate how
subclassing a Viewer class is intended to work.
- Jon
Post by Michael J. WatersHi Kevin,
If you are using the Matplotlib Viewers, you could just skip the
Viewers and use Matplotlib directly. it's not hard to simply setup
subplots using Matplotlib and it should be easy to get them to
update the figure at each time step.
Best,
-Mike
Post by Kevin BlondinoHi,
My problem is one-dimensional. When plotting, I wish to have
side-by-side plots of separate cell variables. The color of the
lines default to a color scheme, i.e. the first line of each
subplot is blue, etc. I wish to have the viewer allow me to
choose the color of the line. Does this already exist? Or would I
have to export it as a TSV and plot it under my own accord? I
scoured the documentation and archive with no avail.
Thanks,
Kevin
_______________________________________________
fipy mailing list
http://www.ctcms.nist.gov/fipy
https://email.nist.gov/mailman/listinfo/fipy
]
_______________________________________________
fipy mailing list
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________
fipy mailing list
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]