Boost logo

Ublas :

From: Dag Lindbo (dag_at_[hidden])
Date: 2007-11-09 09:24:55


John Maddock wrote:
> Dag Lindbo wrote:
>
>> Hello all,
>>
>> I've written a few classes for plotting uBLAS vectors and matrices
>> directly from a C++ program. These has proven useful to me, so I
>> decided to share them. The intention with the interfaces was to be as
>> simple as MATLAB and similar in style.
>>
>> Capabilites:
>> * 2d (x,y) plot, including multiple curves in one plot and line
>> style/color spec.
>> * Surface plot (vec x, vec y, mat z), including scaling of z-axis
>> and camera placement
>> * Contour plot (vec x, vec y, mat z) with a given number of contour
>> lines
>> * Possibility to output to PNG
>>
>> Interested? Pictures and details code at:
>> http://na37.nada.kth.se/mediawiki/index.php/Mat_plot_vtk
>>
>
> Very nice graphics indeed :-)
>
> I'm definitely interested, but can this output vector formats (preferably
> SVG or PS/PDF)?
>
> Cheers, John.
>
>

Well, there is a class in VTK for writing (E)PS, PDF, and SVG files
called vtkGL2PSExporter. However, it requires an external lib, gl2ps. I
haven't gotten around to wrapping this like the PNGWriter. Sadly, given
the state of the VTK documentation I foresee this being a bit tricky.
http://www.vtk.org/doc/nightly/html/classvtkGL2PSExporter.html

//Dag
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>