Copying a figure with black background not working
I want to copy and paste my figure onto ppt.
I have made a figure using black background
This is what it looks like in open figure window:
However if I directly copy and paste it to ppt from the edit menu, it looks like this:
When I save it as jpg, this is what it looks like:
How to solve this issue?
Part of the code: (I am not sure if the way to make the background as black is the issue)
fig = figure;
fig.Color = ‘k’; % figure background color black
tiledlayout(1, (num_days), ‘TileSpacing’, ‘compact’, ‘Padding’, ‘compact’);
% code to generate figure
ax = nexttile; % made it as I have to change the axis to white and background to black
% Set the axes background color to black
ax.Color = ‘k’; % sets the axes color to black
% Adjust the colors for axes and grid to be more visible against the black background
ax.XColor = ‘w’; % sets the x-axis line color to white
ax.YColor = ‘w’; % sets the y-axis line color to white
ax.GridColor = ‘w’; % sets the grid lines color to white (if visible grid is present)I want to copy and paste my figure onto ppt.
I have made a figure using black background
This is what it looks like in open figure window:
However if I directly copy and paste it to ppt from the edit menu, it looks like this:
When I save it as jpg, this is what it looks like:
How to solve this issue?
Part of the code: (I am not sure if the way to make the background as black is the issue)
fig = figure;
fig.Color = ‘k’; % figure background color black
tiledlayout(1, (num_days), ‘TileSpacing’, ‘compact’, ‘Padding’, ‘compact’);
% code to generate figure
ax = nexttile; % made it as I have to change the axis to white and background to black
% Set the axes background color to black
ax.Color = ‘k’; % sets the axes color to black
% Adjust the colors for axes and grid to be more visible against the black background
ax.XColor = ‘w’; % sets the x-axis line color to white
ax.YColor = ‘w’; % sets the y-axis line color to white
ax.GridColor = ‘w’; % sets the grid lines color to white (if visible grid is present) I want to copy and paste my figure onto ppt.
I have made a figure using black background
This is what it looks like in open figure window:
However if I directly copy and paste it to ppt from the edit menu, it looks like this:
When I save it as jpg, this is what it looks like:
How to solve this issue?
Part of the code: (I am not sure if the way to make the background as black is the issue)
fig = figure;
fig.Color = ‘k’; % figure background color black
tiledlayout(1, (num_days), ‘TileSpacing’, ‘compact’, ‘Padding’, ‘compact’);
% code to generate figure
ax = nexttile; % made it as I have to change the axis to white and background to black
% Set the axes background color to black
ax.Color = ‘k’; % sets the axes color to black
% Adjust the colors for axes and grid to be more visible against the black background
ax.XColor = ‘w’; % sets the x-axis line color to white
ax.YColor = ‘w’; % sets the y-axis line color to white
ax.GridColor = ‘w’; % sets the grid lines color to white (if visible grid is present) figure, copy MATLAB Answers — New Questions