Thank you very much. It was indeed the easiest way to do it.

Regards

Wasim Niyaz
Research scholar
CE Dept.
IITM

On Mon, 13 Feb, 2023, 7:22 pm Bruno Turcksin, <bruno.turck...@gmail.com>
wrote:

> Hello,
>
> DataOut is made to add data to a mesh. It cannot be used to do what you
> want. The easiest way to do what you want is to write the vectors to a file
> using print() and then do the plot using matlab or python.
>
> Best,
>
> Bruno
>
> On Saturday, February 11, 2023 at 9:27:06 AM UTC-5
> ce21...@smail.iitm.ac.in wrote:
>
>> Hello everyone. I have 2 Vector<double> vectors A and B of the same
>> size,n. I want to plot A vs B (A along x and B along y). I was trying
>> something like this:
>>  DataOut<1,Vector<double> > data_out;
>>   data_out.add_data_vector (A, "A");
>>   data_out.add_data_vector (B, "B");
>>
>>   // Write the Gnuplot file
>>   data_out.build_patches ();
>>   data_out.write_gnuplot (deallog.get_file_stream());
>>  but it gives these errors:
>> error: type/value mismatch at argument 2 in template parameter list for
>> ‘template<int dim, int spacedim> class dealii::DataOut’
>>  expected a constant of type ‘int’, got ‘dealii::Vector<double>’
>>
>>
>> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/CJH-Z37kLco/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/3a96404f-f7fc-4aa2-83e9-0f35cf8889f6n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/3a96404f-f7fc-4aa2-83e9-0f35cf8889f6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAM8ps5C6hPW60_zsmaTCk2M%2B8dstZQDJjrM%3DtgUZY8NmvgWuPg%40mail.gmail.com.

Reply via email to