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
Hidden Lines appearing when printing wmf format from win device, during conversion of a .docx in pdf #2866
Comments
|
This sort of question is a better fit for https://community.rstudio.com. Do you mind asking it over there? (You might want to read https://www.tidyverse.org/help/ first to maximise your chances of getting a good answer) |
|
Hello, I did but so far the few people that replied seem to be as lost as I am on this one! Thanks, Mario |
|
Because this is occurring during the conversion from word to PDF (as opposed to pdf-generation using RMarkdown, or ggplot2 directly), I think it's out of scope for ggpot2. Also, to maximize your chances of getting help on community, I'd recommend trying to pare things down to be as minimal as possible, including using one of the methods described in reprex do's and don'ts for using built-in data, |
|
useful links can be : |
|
Thank you both! It is indeed a glith of the save as pdf function from Microsoft Word that I was not aware of :) I truly appreciate the help! |
|
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
I'm writing to ask for an opinion about a particularly strange issue I'm facing in one of my plot exports:
i have a rather big dataset that I'm plotting. I trace the statistical median and confidence intervals of my quantities and then facet the data for each group. So far so good. The data are plotted nicely and all seems to be in order
I export the .wmf file (or just do ctrl+w in the win device of Rstudio)
for the graph (as it's the only vectorial format that can be imported in MS Word). The problem is that when I save my word file ( MS Word 2013) to a PDF format using the MS word pdf saving function, my converted file has problems for that graph.
Specifically close to 0 ( all my x , y values are positive ) there are weird lines appearing towards the left end of the data:
the x and y axis are in log10 scale. logticks_annotation does not impact the appearance of the glitch or not...
Any ideas where I would have to look at? At worst I can print a tiff image or sth like that but its quality is not remotely comparable.
I made an example of random data that reproduces the problem:
Please read in the example dataset from the excel file included and change the read path to your own :)
`
library(ggplot2)
data.in.reprex <- read.xlsx("C:/RepRex/dataset.xlsx", sheetName = "1")
y.axis.breaks <- c(1e-12,1e-11,1e-10,1e-9,1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2,1e-1,1e0,1,10,1e2,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13,1e14,1e15)
plotted.rand.example <- ggplot(data.in.reprex, aes(X, Y, group= Groups, colour= Operation, linetype= LineGroups)) +
geom_line(size = 0.75)+
scale_linetype_manual(values=c("solid", "dashed","dotted" ))+ # , "dotted"
scale_colour_manual(values=c("A" = "red", "B" = "blue"),
breaks=c("A", "B"))+
scale_x_log10(labels=trans_format('log10',math_format(10^.x)), breaks=y.axis.breaks, limits=c(10^(floor(log10(min(data.in.reprex$X )))),
10^(ceiling(log10(max(data.in.reprex$X)))) ))+
scale_y_log10(labels=trans_format('log10',math_format(10^.x)), breaks=y.axis.breaks, limits=c(10^(floor(log10(min(data.in.reprex$Y )))),
10^(ceiling(log10(max(data.in.reprex$Y)))) ))+
annotation_logticks(base = 10, sides = "tblr")+
labs(x = "X Quantity", y= "Y Quantity") +
facet_wrap(~Condition, nrow = 4, ncol = 2)
{windows(width = 13, height = 15)
plotted.rand.example
}`
Output:

dataset.xlsx
I have a similar issue with another type of plot which is a linear linear plor of 9 points in total, so I don't really see where this is coming from !
Thank you for your help !
The text was updated successfully, but these errors were encountered: