I would like to export a vector version .pdf of a plot
but I would like the exported version to look exactly like what is shown in the Plot zoom window.
My quibble is that the vector plot produced using the Rstudio built-in export feature (image on left), is subtly different from what is shown in the Plot zoom window (image on right).
for example in the image below the colors are tad different, and the scattered points in the exported version don't possess that fine stroke that is seen in the Plot Zoom window.
Is there anyway I could get the exact vector version of the Plot Zoom window?
Related
I'm using corrplot in R to plot the correlation matrrix. For some reason, the edges of the circles in the plot seems missing some pixels. The plot overall looks very rough. Please see the graph I plotted:
enter image description here
But the example I followed shows the plot is supposed to be like this:
enter image description here
My initial guess was dpi and scaling issue because I use a 4K display. I tried changing the resolution and size of the plots but it doesn't work.
Thank you so much for your help.
I plot 3D scenes from Julia using PlotlyJS into an Electron window. When I change the viewing parameters with the mouse, zooming, panning, or rotating, how do I get the eye, center, and the up vector from the plot? Even when I save the plot into a JSON file, the camera parameters are those of the original plot.
I found that setting the options of the plot as
options=Dict(:showLink => true)
equips the plot with a link to a web site where the plot can be manipulated. The camera settings can be read off there. See, for instance, https://github.com/PetrKryslUCSD/FinEtoolsFlexBeams.jl/blob/master/examples/graphics/edit_plot.jl
I use Matlab on an Osx retina display.
When I plot points (or a line, like a function), the points (or the line) are not smooth, no matter which size for the x-step I choose.
But when I try to resize manually the figure window (when the plot changes its dimensions on the screen), the points (or the line) instantaneously become smoother and better defined.
Does anyone know how can I obtain a smooth plot without resizing the figure window ?
Thanks
I'm trying to generate a 3d scatterplot using rgl. It looks great on my screen, but whenever I export it as a PDF (or any other postscript format) it completely ignores any size specifications I use.
(I'm running RGui v.2.15.1 and rgl v.0.92.892 on a Macbook under Mountain Lion.)
For example:
library(rgl)
set.seed(1982)
points3d(runif(5),runif(5),runif(5), size=20)
# points look huge
rgl.postscript('testplot.pdf', fmt='pdf')
# points look tiny
Does anyone have an idea for a way to get this to work? The resolution of the images I get using rgl.snapshot don't look so good, and I would really like to get a vector image for this plot.
Also, I followed this thread and I got text to resize just fine, but not points. So I thought one way to work around this would be to plot my points as text using a circle as my character, but I couldn't get rgl to accept symbols or expressions either...
Confirmed on Windows, look like some paper size scaling problem. You might try
spheres3d(runif(5),runif(5),runif(5),radius=0.1)
as a workaround if you can live with real 3d.
I have just started playing with the quantmod package. The documentation is however, quite sparse (perhaps understandably, since it is OSS).
I am currently using barChart() which is a nice wrapper around chartSeries() and does most of what I want, but the default chart it produces are not quite what I want. To be specific, I want to tweak the charts produced by barChart() to suit my needs - however, since I am a newbie, I don't know whether my "tweaks" can be provided as options to the wrapper barChart(), or if I need to call chartSeries() directly, with specific arguments.
I have been tearing my hair out trying to do the following:
replace the horrible {start date}/{end date} text in the top right hand of the chart produced by barChart() with text of my own choosing
specify the formating to be used on the X axis (for example, show only the last two digits of the century. i.e. '98, '99, '00, '01 etc)
'Force' both top chart and the bottom chart to have their Y values printed on the left hand side of the chart
Add an aditional series to the bottom chart
Use different up/down colors for the bottom chart (defaults the using the same up/down colors for both top and bottom charts)
Plot just the top chart (no bottom chart)
Specify X axis, Y axis grid line spacings for top chart, for bottom chart
Write the image to an alternative output (e.g. png image or pdf document) instead of the graphics device
Can anyone help with any (or all) of the above?.
This functionality isn't available (patches welcome).
This functionality isn't available (patches welcome).
This functionality isn't available (patches welcome).
See the sparse documentation for ?addTA, specifically the on argument.
Plot the bottom chart as two separate up/down series, using two different colors, or perhaps chartTheme.
Not sure what you mean; just don't plot the bottom chart...
See the sparse documentation for the major.ticks argument to chartSeries. I don't think you can change the y axis grid line spacings, and the x axis spacing will be the same for the top and bottom chart.
See ?png and ?pdf.
To change or remove the bottom chart,
check the TA argument of chartSeries function
(there is an example in the manual);
to change the colours,
check the theme argument
(there is an example in the manual);
to write to a png or pdf file,
use the png or pdf functions,
as with other plotting functions.
To fine-tune the axes and labels, it is probably easier to bypass
chartSeries altogether and plot the data yourself, with base graphics,
lattice or ggplot2.