-
Notifications
You must be signed in to change notification settings - Fork 13
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
vector plot magnitude broken? #386
Comments
Thanks @doutriaux1, I'll take a look. ping @danlipsa @aashish24 |
@doutriaux1 Maybe I'm just missing them? I don't see any attachments. |
Hi @scottwittenburg , |
@aashish24 I think you introduced option on magnitude a while back, can you comment on this? |
@aashish24 I meant these options: https://github.com/CDAT/vcs/blob/master/vcs/vector.py#L342 |
@aashish24 and somewhere there: https://github.com/CDAT/vcs/blob/master/vcs/vcsvtk/vectorpipeline.py#L123-L126 @aashish24 we need to add these to the doc string i think. |
In order to reproduce the issue with vector export taking so long, will it be possible for you to share the |
And @roshni1991 I just want to be clear about the purpose of the |
Hi @scottwittenburg, as per my understanding the |
@roshni1991 thx for the feedback, you are right the behaviour is indeed broken, we just needed to confirm with you that it was the expected behaviour. |
@roshni1991 we expect to fix this shortly, thx for spotting it. |
Thanks for the pdf/ps reproduction script @roshni1991, however, I'm currently unable to reproduce the issue you're having. I am running into some other problem though, so I'm curious what version of
|
@scottwittenburg Im using the following version of vcs: |
Thanks for that version information @roshni1991. @danlipsa @doutriaux1 Do either of you recognize the version numbers well enough to know whether that Anyway, I finally figured out what was happening on my system locally when I tried the repro script uploaded above. The issue I saw was that no pdf was generated at all, but a bunch of error messages were printed to the terminal, looking like this: 2019-02-18 16:47:03.682 ( 6.118s) [ D07A6700] vtkPDFExporter.cxx:113 ERR| vtkPDFExporter (0x561e7962c080): LibHaru failed during PDF export. Error=0x105d detail=0
2019-02-18 16:47:03.685 ( 6.121s) [ D07A6700]vtkPDFContextDevice2D.c:399 WARN| Error preparing libharu font object.
2019-02-18 16:47:03.685 ( 6.121s) [ D07A6700]vtkPDFContextDevice2D.c:1324 ERR| vtkPDFContextDevice2D (0x561e794a0380): Error preparing to draw string: U
2019-02-18 16:47:03.896 ( 6.333s) [ D07A6700]vtkPDFContextDevice2D.c:399 WARN| Error preparing libharu font object.
2019-02-18 16:47:03.896 ( 6.333s) [ D07A6700]vtkPDFContextDevice2D.c:1324 ERR| vtkPDFContextDevice2D (0x561e794a0380): Error preparing to draw string: Zonal Wind
2019-02-18 16:47:03.896 ( 6.333s) [ D07A6700]vtkPDFContextDevice2D.c:399 WARN| Error preparing libharu font object.
... I looked up that first error code ( Stepping through with the debugger, it seems that because the So @roshni1991 I can think of a couple possibilities off the top of my head at this point: 1) you could try to install the latest |
@roshni1991 it seems the version of conda create -n vtk-cdat-py2-test -c cdat/label/nightly -c conda-forge "python<3" vcs cdat cdms2 Once that is installed, activate that environment and try your pdf export example again. |
@scottwittenburg it lloks like it's a pre context2d version. |
@doutriaux1 Yes I think so. I'll be curious to see if installing the latest nightly solves the pdf/ps export issue. |
@scottwittenburg I think you are right. I changed the font for the text |
Hai, $ conda list | grep vtk-cdat Thanks. |
I don't think there has been any work done to resolve the issue, we were hoping that using the latest version (from after the context2d work was merged) would resolve it. Perhaps if you share more details about what you're trying (the vcs code) and the specific problem you're seeing (error output), someone may recognize the problem or know of a workaround. Hope this helps. |
I am loading Helvetica font as follows, helvetica_font = os.path.join(fontdir, 'helvetica.ttf') tt = v.createtexttable() tlp = v.createtemplate() v.plot(...) I am getting the following error ERROR: In ../IO/ExportPDF/vtkPDFContextDevice2D.cxx, line 1324 Generic Warning: In ../IO/ExportPDF/vtkPDFContextDevice2D.cxx, line 399 ERROR: In ../IO/ExportPDF/vtkPDFContextDevice2D.cxx, line 1324 Generic Warning: In ../IO/ExportPDF/vtkPDFContextDevice2D.cxx, line 399 Let me know if you want more information on this. |
Thanks for providing the details @arulalant. Based on that, it seems like exporting to PDF with custom fonts is broken. By the way, somehow this issue got pretty far afield from the topic/title. Maybe it deserves to be it's own issue so it can be tracked more easily. Just my |
I am using CDAT 8.0 to create plots using vcs. I'm facing two major problems while plotting.
1).On plotting a vector plot using vcs, I am not able to set the reference value of the vector in the plot.
I am using the following steps to create vector.
myvec = x.createvector('myvec')
myvec.scale = 1
myvec.reference = 300
The plot does not show the reference value to be 300 and picks up a random number. I have tried changing the scale value also where the value changes but still shows a random number in the plot. I am attaching a plot where on bottom left corner of each plot the value of vector is provided (555.5, 266.9,496.1) while my reference value is set to 300.
My question is, how is this resultant value of vector calculated and how is it controlled. As per my understanding, this number is related to setting of the reference value or scale.
Please advice on what and where I am going wrong in my understanding.
2). On saving any plot created through vcs, the PDF and postscript files are getting corrupted. I am only able to save a .png file where the quality of the plot is not very good. On saving in any other format, it takes very long to create the file (almost 10 minutes) and the file looks funny with all lines formed all over the plot. Please let me know why and how to resolve this problem.
I am attaching 1 plot (.ps format) showing both the above issues mentioned.
Please let me know how to solve these issues and get the desired plot.
Thanking you in advance.
The text was updated successfully, but these errors were encountered: