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

Degree Symbol does not plot #407

Open
arulalant opened this issue May 17, 2019 · 7 comments
Open

Degree Symbol does not plot #407

arulalant opened this issue May 17, 2019 · 7 comments
Assignees
Labels
bug high Highest priority issue

Comments

@arulalant
Copy link
Contributor

Hai,

In previous versions of cdat, we used to plot degree symbol by !Uo!D.
But in cdat8.1 version, it is not plotting degree symbol instead it just displaying text as !Uo!D.

Is there any way to plot degree Celsius or degree symbol. ?

@indseelan
Copy link

indseelan commented May 18, 2019 via email

@arulalant
Copy link
Contributor Author

arulalant commented May 18, 2019

Hai,

Thanks. Using the command ($^{\circ}$C) I am able to plot degree Celsius symbol in cdat8.1. When I am storing the vcs canvas as png, it works perfectly. But when I am saving canvas as pdf, a red colored rectangular border seems to appear over the text (after inserted $^{\circ}$C).

See the attached screenshot taken on pdf file.
vcs-degree-symbol

Is there any solution to save pdf without red colored border line ?

@doutriaux1 doutriaux1 added bug high Highest priority issue labels May 20, 2019
@scottwittenburg
Copy link
Collaborator

ping @danlipsa

@arulalant
Copy link
Contributor Author

@doutriaux1 Thanks. Meanwhile is that possible to increase png dpi resolution while saving x.png(filename)?. I couldn't control the dpi in the argument. If I am able to save high definition png image, then also my problem will solve as of now (for plotting degree symbol).

@doutriaux1
Copy link
Contributor

@arulalant you can pass width= and heigth= to the png function. Or create big canvas at init time:

import vcs
x=vcs.init(geometry={"width":3000,"height":2000})
x.plot(...)
x.png("filename.png")

or

import vcs
x=vcs.init()
x.plot(...)
x.png("filename.png", width=8000, height=4000, units="pixels")

@arulalant
Copy link
Contributor Author

Hai,

When I try to change the default font and save plot as pdf, then I am getting error.

v = vcs.init()
v.addfont(helvetica_font, 'helvetica')
vcs.setdefaultfont('helvetica')
...
v.pdf('out.pdf')

ERROR: In ../IO/ExportPDF/vtkPDFExporter.cxx, line 113
vtkPDFExporter (0x7fd3223c24c0): LibHaru failed during PDF export. Error=0x105d detail=0

I am getting the above error while saving as pdf only, not other formats.
Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high Highest priority issue
Projects
None yet
Development

No branches or pull requests

4 participants